diff --git a/indra/newview/app_settings/settings_alchemy.xml b/indra/newview/app_settings/settings_alchemy.xml index 9225a2e55f45c155b665bbebc729f27212a7599d..43cdcf2118157aa4b1833eb427320cddbd0f8f1b 100644 --- a/indra/newview/app_settings/settings_alchemy.xml +++ b/indra/newview/app_settings/settings_alchemy.xml @@ -706,6 +706,17 @@ <key>Value</key> <string /> </map> + <key>OpenSimSearchURL</key> + <map> + <key>Comment</key> + <string>OpenSim fallback search url</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>String</string> + <key>Value</key> + <string>http://search.metaverseink.com/opensim/results.jsp?query=[QUERY]&submit=[CATEGORY]</string> + </map> <key>RenderAutoMaskAlphaUseRMSE</key> <map> <key>Comment</key> diff --git a/indra/newview/llfloatersearch.cpp b/indra/newview/llfloatersearch.cpp index 0dbc8b2d2442aa8698d43929238b66430b350263..f135fe4f62e98de016cfac7da303853b57b70c9b 100644 --- a/indra/newview/llfloatersearch.cpp +++ b/indra/newview/llfloatersearch.cpp @@ -38,6 +38,8 @@ #include "llagent.h" #include "llui.h" #include "llviewercontrol.h" +#include "llviewernetwork.h" +#include "llviewerregion.h" #include "llweb.h" // support secondlife:///app/search/{CATEGORY}/{QUERY} SLapps @@ -199,7 +201,9 @@ void LLFloaterSearch::search(const SearchQuery &p) // get the search URL and expand all of the substitutions // (also adds things like [LANGUAGE], [VERSION], [OS], etc.) - std::string url = gSavedSettings.getString("SearchURL"); + LLViewerRegion* regionp = gAgent.getRegion(); + std::string url = regionp != nullptr ? regionp->getSearchServerURL() + : gSavedSettings.getString(LLGridManager::getInstance()->isInOpenSim() ? "OpenSimSearchURL" : "SearchURL") : url = LLWeb::expandURLSubstitutions(url, subs); // and load the URL in the web view