summaryrefslogtreecommitdiff
path: root/indra/newview/llviewerhome.cpp
diff options
context:
space:
mode:
authorBrad Payne (Vir Linden) <vir@lindenlab.com>2009-12-16 11:43:08 -0500
committerBrad Payne (Vir Linden) <vir@lindenlab.com>2009-12-16 11:43:08 -0500
commit9813df87af1d895a3183eb33648009fd70ce6ed7 (patch)
tree4cb519a2402856c7ede8d5ba5e8feff798ea6bdb /indra/newview/llviewerhome.cpp
parentadec0ba983c6b01c3d6c08692f3d5c7979ba90bb (diff)
parent073ec70829723e54f822052fe9c6c3e998e8dfca (diff)
merge
--HG-- branch : avatar-pipeline
Diffstat (limited to 'indra/newview/llviewerhome.cpp')
-rw-r--r--indra/newview/llviewerhome.cpp27
1 files changed, 14 insertions, 13 deletions
diff --git a/indra/newview/llviewerhome.cpp b/indra/newview/llviewerhome.cpp
index 58630978c4..6299b4fabd 100644
--- a/indra/newview/llviewerhome.cpp
+++ b/indra/newview/llviewerhome.cpp
@@ -35,12 +35,11 @@
#include "llviewerhome.h"
#include "lllogininstance.h"
+#include "llsd.h"
#include "llui.h"
#include "lluri.h"
-#include "llsd.h"
-#include "llversioninfo.h"
#include "llviewercontrol.h"
-#include "llviewernetwork.h"
+#include "llweb.h"
//static
std::string LLViewerHome::getHomeURL()
@@ -49,16 +48,12 @@ std::string LLViewerHome::getHomeURL()
// this value from settings.xml and support various substitutions
LLSD substitution;
- substitution["VERSION"] = LLVersionInfo::getVersion();
- substitution["CHANNEL"] = LLURI::escape(gSavedSettings.getString("VersionChannelName"));
- substitution["LANGUAGE"] = LLUI::getLanguage();
- substitution["AUTH_KEY"] = LLURI::escape(getAuthKey());
- substitution["GRID"] = LLViewerLogin::getInstance()->getGridLabel();
+ substitution["AUTH_TOKEN"] = LLURI::escape(getAuthKey());
+ // get the home URL and expand all of the substitutions
+ // (also adds things like [LANGUAGE], [VERSION], [OS], etc.)
std::string homeURL = gSavedSettings.getString("HomeSidePanelURL");
- LLStringUtil::format(homeURL, substitution);
-
- return homeURL;
+ return LLWeb::expandURLSubstitutions(homeURL, substitution);
}
//static
@@ -67,7 +62,13 @@ std::string LLViewerHome::getAuthKey()
// return the value of the (optional) auth token returned by login.cgi
// this lets the server provide an authentication token that we can
// blindly pass to the Home web page for it to perform authentication.
- static const std::string authKeyName("home_sidetray_token");
- return LLLoginInstance::getInstance()->getResponse(authKeyName);
+ // We use "home_sidetray_token", and fallback to "auth_token" if not
+ // present.
+ LLSD auth_token = LLLoginInstance::getInstance()->getResponse("home_sidetray_token");
+ if (auth_token.asString().empty())
+ {
+ auth_token = LLLoginInstance::getInstance()->getResponse("auth_token");
+ }
+ return auth_token.asString();
}