From 1144fdc0441d1ea2113474585ed55d2690501a7b Mon Sep 17 00:00:00 2001 From: daianakproductengine Date: Mon, 10 Jul 2017 20:15:04 +0300 Subject: MAINT-6976 Fixed incorrect search line for open grid's in Search floater --- indra/newview/app_settings/settings.xml | 2 +- indra/newview/llweb.cpp | 16 ++++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 5b501514c7..2987f84319 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -4545,7 +4545,7 @@ Type String Value - http://search.secondlife.com/viewer/[CATEGORY]/?q=[QUERY]&p=[AUTH_TOKEN]&r=[MATURITY]&lang=[LANGUAGE]&g=[GODLIKE]&sid=[SESSION_ID]&rid=[REGION_ID]&pid=[PARCEL_ID]&channel=[CHANNEL]&version=[VERSION]&major=[VERSION_MAJOR]&minor=[VERSION_MINOR]&patch=[VERSION_PATCH]&build=[VERSION_BUILD] + https://search.[GRID]/viewer/[CATEGORY]/?q=[QUERY]&p=[AUTH_TOKEN]&r=[MATURITY]&lang=[LANGUAGE]&g=[GODLIKE]&sid=[SESSION_ID]&rid=[REGION_ID]&pid=[PARCEL_ID]&channel=[CHANNEL]&version=[VERSION]&major=[VERSION_MAJOR]&minor=[VERSION_MINOR]&patch=[VERSION_PATCH]&build=[VERSION_BUILD] HighResSnapshot diff --git a/indra/newview/llweb.cpp b/indra/newview/llweb.cpp index 8026dc3ea8..ec82765b96 100644 --- a/indra/newview/llweb.cpp +++ b/indra/newview/llweb.cpp @@ -224,6 +224,22 @@ std::string LLWeb::expandURLSubstitutions(const std::string &url, } substitution["PARCEL_ID"] = llformat("%d", parcel_id); + // find the grid + std::string current_grid = LLGridManager::getInstance()->getGridId(); + std::transform(current_grid.begin(), current_grid.end(), current_grid.begin(), ::tolower); + if (current_grid == "agni") + { + substitution["GRID"] = "secondlife.com"; + } + else if (current_grid == "damballah") + { + // Staging grid has its own naming scheme. + substitution["GRID"] = "secondlife-staging.com"; + } + else + { + substitution["GRID"] = llformat("%s.lindenlab.com", current_grid.c_str()); + } // expand all of the substitution strings and escape the url std::string expanded_url = url; LLStringUtil::format(expanded_url, substitution); -- cgit v1.2.3