diff --git a/indra/cmake/Variables.cmake b/indra/cmake/Variables.cmake
index 2333a587c6..ba0287844c 100644
--- a/indra/cmake/Variables.cmake
+++ b/indra/cmake/Variables.cmake
@@ -125,6 +125,10 @@ set(VIEWER ON CACHE BOOL "Build Firestorm viewer.")
set(VIEWER_CHANNEL "FirestormPrivate" CACHE STRING "Viewer Channel Name")
set(VIEWER_LOGIN_CHANNEL ${VIEWER_CHANNEL} CACHE STRING "Fake login channel for A/B Testing")
+# Flickr API keys.
+set(FLICKR_API_KEY "ebc94a4d2651c33404b0fb8ee1b78958")
+set(FLICKR_API_SECRET "73efdfa10ebe7625")
+
set(STANDALONE OFF CACHE BOOL "Do not use Linden-supplied prebuilt libraries.")
if (NOT STANDALONE AND EXISTS ${CMAKE_SOURCE_DIR}/llphysics)
diff --git a/indra/llcommon/lluri.cpp b/indra/llcommon/lluri.cpp
index b39ea0c6f2..910fe6cf0a 100644
--- a/indra/llcommon/lluri.cpp
+++ b/indra/llcommon/lluri.cpp
@@ -180,6 +180,18 @@ std::string LLURI::escape(const std::string& str)
return escape(str, default_allowed, true);
}
+//static
+std::string LLURI::escapeQueryValue(const std::string& s)
+{
+ return ::escapeQueryValue(s);
+}
+
+//static
+std::string LLURI::escapeQueryVariable(const std::string& s)
+{
+ return ::escapeQueryVariable(s);
+}
+
LLURI::LLURI()
{
}
@@ -595,10 +607,10 @@ std::string LLURI::mapToQueryString(const LLSD& queryMap)
{
ostr << "&";
}
- ostr << escapeQueryVariable(iter->first);
+ ostr << ::escapeQueryVariable(iter->first);
if(iter->second.isDefined())
{
- ostr << "=" << escapeQueryValue(iter->second.asString());
+ ostr << "=" << ::escapeQueryValue(iter->second.asString());
}
}
query_string = ostr.str();
diff --git a/indra/llcommon/lluri.h b/indra/llcommon/lluri.h
index c82a666e48..576a3d73b0 100644
--- a/indra/llcommon/lluri.h
+++ b/indra/llcommon/lluri.h
@@ -134,6 +134,28 @@ public:
*/
static std::string escape(const std::string& str);
+ /**
+ * @brief The same as escape, but also does not escape:
+ * :@!$'()*+,=
+ *
+ * @see http://www.ietf.org/rfc/rfc1738.txt
+ *
+ * @param str The raw URI to escape.
+ * @return Returns the escaped uri or an empty string.
+ */
+ static std::string escapeQueryValue(const std::string& str);
+
+ /**
+ * @brief The same as escape, but also does not escape:
+ * :@!$'()*+,
+ *
+ * @see http://www.ietf.org/rfc/rfc1738.txt
+ *
+ * @param str The raw URI to escape.
+ * @return Returns the escaped uri or an empty string.
+ */
+ static std::string escapeQueryVariable(const std::string& str);
+
/**
* @brief Escape a string with a specified set of allowed characters.
*
diff --git a/indra/llxml/llxmltree.cpp b/indra/llxml/llxmltree.cpp
index f2386700a1..85b2f18be6 100644
--- a/indra/llxml/llxmltree.cpp
+++ b/indra/llxml/llxmltree.cpp
@@ -77,6 +77,23 @@ BOOL LLXmlTree::parseFile(const std::string &path, BOOL keep_contents)
return success;
}
+
+BOOL LLXmlTree::parseString(const std::string &string, BOOL keep_contents)
+{
+ delete mRoot;
+ mRoot = NULL;
+
+ LLXmlTreeParser parser(this);
+ BOOL success = parser.parseString( string, &mRoot, keep_contents );
+ if( !success )
+ {
+ S32 line_number = parser.getCurrentLineNumber();
+ const char* error = parser.getErrorString();
+ llwarns << "LLXmlTree parse failed. Line " << line_number << ": " << error << llendl;
+ }
+ return success;
+}
+
void LLXmlTree::dump()
{
if( mRoot )
@@ -517,14 +534,35 @@ BOOL LLXmlTreeParser::parseFile(const std::string &path, LLXmlTreeNode** root, B
{
llassert( !mRoot );
llassert( !mCurrent );
-
+
mKeepContents = keep_contents;
-
+
BOOL success = LLXmlParser::parseFile(path);
-
+
*root = mRoot;
mRoot = NULL;
+
+ if( success )
+ {
+ llassert( !mCurrent );
+ }
+ mCurrent = NULL;
+
+ return success;
+}
+BOOL LLXmlTreeParser::parseString(const std::string &string, LLXmlTreeNode** root, BOOL keep_contents)
+{
+ llassert( !mRoot );
+ llassert( !mCurrent );
+
+ mKeepContents = keep_contents;
+
+ BOOL success = LLXmlParser::parse(string.c_str(), string.length(), true);
+
+ *root = mRoot;
+ mRoot = NULL;
+
if( success )
{
llassert( !mCurrent );
diff --git a/indra/llxml/llxmltree.h b/indra/llxml/llxmltree.h
index bdcb56f1f3..0379cb7106 100644
--- a/indra/llxml/llxmltree.h
+++ b/indra/llxml/llxmltree.h
@@ -56,6 +56,7 @@ public:
void cleanup();
virtual BOOL parseFile(const std::string &path, BOOL keep_contents = TRUE);
+ virtual BOOL parseString(const std::string &string, BOOL keep_contents = TRUE);
LLXmlTreeNode* getRoot() { return mRoot; }
@@ -200,6 +201,7 @@ public:
virtual ~LLXmlTreeParser();
BOOL parseFile(const std::string &path, LLXmlTreeNode** root, BOOL keep_contents );
+ BOOL parseString(const std::string &string, LLXmlTreeNode** root, BOOL keep_contents);
protected:
const std::string& tabs();
diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt
index 00bba71edc..f938d535a0 100644
--- a/indra/newview/CMakeLists.txt
+++ b/indra/newview/CMakeLists.txt
@@ -66,6 +66,7 @@ include_directories(
${LSCRIPT_INCLUDE_DIRS}/lscript_compile
${LLLOGIN_INCLUDE_DIRS}
${UPDATER_INCLUDE_DIRS}
+ ${CMAKE_BINARY_DIR}/newview
)
set(viewer_SOURCE_FILES
@@ -591,6 +592,9 @@ set(viewer_SOURCE_FILES
noise.cpp
panel_prefs_firestorm.cpp
pipeline.cpp
+ kvflickr.cpp
+ kvfloaterflickrauth.cpp
+ kvfloaterflickrupload.cpp
qtoolalign.cpp
rlvhandler.cpp
rlvhelper.cpp
@@ -1155,8 +1159,18 @@ set(viewer_HEADER_FILES
streamtitledisplay.h
VertexCache.h
VorbisFramework.h
+ kvflickr.h
+ kvfloaterflickrauth.h
+ kvfloaterflickrupload.h
)
+# Generate the Flickr Keys header
+configure_file(
+ ${CMAKE_CURRENT_SOURCE_DIR}/kvflickrkeys.h.in
+ ${CMAKE_CURRENT_BINARY_DIR}/kvflickrkeys.h
+ @ONLY
+)
+list(APPEND viewer_HEADER_FILES ${CMAKE_CURRENT_BINARY_DIR}/kvflickrkeys.h)
source_group("CMake Rules" FILES ViewerInstall.cmake)
if (DARWIN)
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index f16a09c062..afa4620e32 100644
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -13425,5 +13425,49 @@ Change of this parameter will affect the layout of buttons in notification toast
Value
0
+ KittyFlickrLastRating
+
+ KittyFlickrLastTags
+
+ KittyFlickrShowPosition
+
+ KittyFlickrIncludeSLURL
+
diff --git a/indra/newview/app_settings/settings_per_account.xml b/indra/newview/app_settings/settings_per_account.xml
index 13e59e8f63..1553f1a67b 100644
--- a/indra/newview/app_settings/settings_per_account.xml
+++ b/indra/newview/app_settings/settings_per_account.xml
@@ -196,6 +196,39 @@
+ KittyFlickrToken
+
+ KittyFlickrUsername
+
+ KittyFlickrNSID
+
DebugLookAt