From 7bc1eaf22f3c8bde69922215fb61b448afa8967a Mon Sep 17 00:00:00 2001
From: Leslie Linden <leslie@lindenlab.com>
Date: Fri, 14 Oct 2011 15:22:53 -0700
Subject: [PATCH] EXP-1342 FIX -- Update avatar picker and destination guide
 urls

* URL's are in place with the [GRID_LOWERCASE] used in the link to go to the
  proper page based on the grid.
* Added "GRID_LOWERCASE" substitution for URL's since it is case sensitive
---
 indra/newview/app_settings/settings.xml |  6 +++---
 indra/newview/llviewermenu.cpp          |  3 ++-
 indra/newview/llviewerwindow.cpp        | 10 +++++++---
 indra/newview/llweb.cpp                 |  1 +
 4 files changed, 13 insertions(+), 7 deletions(-)

diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index da2161c8dec..52aa2a3be39 100644
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -619,7 +619,7 @@
       <key>Type</key>
       <string>String</string>
       <key>Value</key>
-      <string>http://drofnas.components.pdp48.lindenlab.com/avatars.html</string>
+      <string>http://lecs-viewer-web-components.s3.amazonaws.com/v3.0/[GRID_LOWERCASE]/avatars.html</string>
     </map>
     <key>AvatarBakedTextureUploadTimeout</key>
     <map>
@@ -2717,7 +2717,7 @@
       <key>Type</key>
       <string>String</string>
       <key>Value</key>
-      <string>http://drofnas.components.pdp48.lindenlab.com/guide.html</string>
+      <string>http://lecs-viewer-web-components.s3.amazonaws.com/v3.0/[GRID_LOWERCASE]/guide.html</string>
     </map>
   <key>DisableCameraConstraints</key>
     <map>
@@ -4037,7 +4037,7 @@
       <key>Type</key>
       <string>String</string>
       <key>Value</key>
-      <string>http://common-flash-secondlife-com.s3.amazonaws.com/viewer/v2.6/agni/howto/index.html</string>
+      <string>http://lecs-viewer-web-components.s3.amazonaws.com/v3.0/[GRID_LOWERCASE]/howto/index.html</string>
     </map>    
     <key>HomeSidePanelURL</key>
     <map>
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp
index 10563971b30..57ff62f60fc 100644
--- a/indra/newview/llviewermenu.cpp
+++ b/indra/newview/llviewermenu.cpp
@@ -6893,7 +6893,8 @@ class LLToggleHowTo : public view_listener_t
 	bool handleEvent(const LLSD& userdata)
 	{
 		LLFloaterWebContent::Params p;
-		p.url = gSavedSettings.getString("HowToHelpURL");
+		std::string url = gSavedSettings.getString("HowToHelpURL");
+		p.url = LLWeb::expandURLSubstitutions(url, LLSD());
 		p.show_chrome = false;
 		p.target = "__help_how_to";
 		p.show_page_title = false;
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp
index 0873e4f6ea3..1d64e22db27 100644
--- a/indra/newview/llviewerwindow.cpp
+++ b/indra/newview/llviewerwindow.cpp
@@ -1947,13 +1947,17 @@ void LLViewerWindow::initWorldUI()
 	if (destinations)
 	{
 		destinations->setErrorPageURL(gSavedSettings.getString("GenericErrorPageURL"));
-		destinations->navigateTo(gSavedSettings.getString("DestinationGuideURL"), "text/html");
+		std::string url = gSavedSettings.getString("DestinationGuideURL");
+		url = LLWeb::expandURLSubstitutions(url, LLSD());
+		destinations->navigateTo(url, "text/html");
 	}
 	LLMediaCtrl* avatar_picker = LLFloaterReg::getInstance("avatar")->findChild<LLMediaCtrl>("avatar_picker_contents");
 	if (avatar_picker)
 	{
 		avatar_picker->setErrorPageURL(gSavedSettings.getString("GenericErrorPageURL"));
-		avatar_picker->navigateTo(gSavedSettings.getString("AvatarPickerURL"), "text/html");
+		std::string url = gSavedSettings.getString("AvatarPickerURL");
+		url = LLWeb::expandURLSubstitutions(url, LLSD());
+		avatar_picker->navigateTo(url, "text/html");
 	}
 }
 
@@ -1980,7 +1984,7 @@ void LLViewerWindow::shutdownViews()
 	// *TODO: Make LLNavigationBar part of gViewerWindow
 	if (LLNavigationBar::instanceExists())
 	{
-	delete LLNavigationBar::getInstance();
+		delete LLNavigationBar::getInstance();
 	}
 
 	// destroy menus after instantiating navbar above, as it needs
diff --git a/indra/newview/llweb.cpp b/indra/newview/llweb.cpp
index 7bc54536883..b2f35892d0a 100644
--- a/indra/newview/llweb.cpp
+++ b/indra/newview/llweb.cpp
@@ -210,6 +210,7 @@ std::string LLWeb::expandURLSubstitutions(const std::string &url,
 	substitution["VERSION_BUILD"] = LLVersionInfo::getBuild();
 	substitution["CHANNEL"] = LLVersionInfo::getChannel();
 	substitution["GRID"] = LLGridManager::getInstance()->getGridLabel();
+	substitution["GRID_LOWERCASE"] = utf8str_tolower(LLGridManager::getInstance()->getGridLabel());
 	substitution["OS"] = LLAppViewer::instance()->getOSInfo().getOSStringSimple();
 	substitution["SESSION_ID"] = gAgent.getSessionID();
 	substitution["FIRST_LOGIN"] = gAgent.isFirstLogin();
-- 
GitLab