Skip to content
Snippets Groups Projects
Commit e3211c4a authored by Lynx Linden's avatar Lynx Linden
Browse files

EXT-3679: Send Session, Region, and Parcel IDs to Search.

These IDs are sent as the following query parameters to the search
server: sid=, rid=, pid=, for the Session ID, Region ID, and Parcel ID
respectively.

For some reason, Parcel ID always seems to be NULL though. I'll file a
separate JIRA for that.
parent 840b8b04
No related branches found
No related tags found
No related merge requests found
...@@ -3585,7 +3585,7 @@ ...@@ -3585,7 +3585,7 @@
<key>Type</key> <key>Type</key>
<string>String</string> <string>String</string>
<key>Value</key> <key>Value</key>
<string>http://int.searchwww-phx0.damballah.lindenlab.com/viewer/[CATEGORY]?q=[QUERY]&amp;p=[AUTH_TOKEN]&amp;r=[MATURITY]&amp;lang=[LANGUAGE]&amp;g=[GODLIKE]</string> <string>http://int.searchwww-phx0.damballah.lindenlab.com/viewer/[CATEGORY]?q=[QUERY]&amp;p=[AUTH_TOKEN]&amp;r=[MATURITY]&amp;lang=[LANGUAGE]&amp;g=[GODLIKE]&amp;sid=[SESSION_ID]&amp;rid=[REGION_ID]&amp;pid=[PARCEL_ID]</string>
</map> </map>
<key>HighResSnapshot</key> <key>HighResSnapshot</key>
<map> <map>
......
...@@ -38,10 +38,12 @@ ...@@ -38,10 +38,12 @@
// Library includes // Library includes
#include "llwindow.h" // spawnWebBrowser() #include "llwindow.h" // spawnWebBrowser()
#include "llagent.h"
#include "llappviewer.h" #include "llappviewer.h"
#include "llfloatermediabrowser.h" #include "llfloatermediabrowser.h"
#include "llfloaterreg.h" #include "llfloaterreg.h"
#include "lllogininstance.h" #include "lllogininstance.h"
#include "llparcel.h"
#include "llsd.h" #include "llsd.h"
#include "lltoastalertpanel.h" #include "lltoastalertpanel.h"
#include "llui.h" #include "llui.h"
...@@ -49,6 +51,8 @@ ...@@ -49,6 +51,8 @@
#include "llversioninfo.h" #include "llversioninfo.h"
#include "llviewercontrol.h" #include "llviewercontrol.h"
#include "llviewernetwork.h" #include "llviewernetwork.h"
#include "llviewerparcelmgr.h"
#include "llviewerregion.h"
#include "llviewerwindow.h" #include "llviewerwindow.h"
class URLLoader : public LLToastAlertPanel::URLLoader class URLLoader : public LLToastAlertPanel::URLLoader
...@@ -144,7 +148,27 @@ std::string LLWeb::expandURLSubstitutions(const std::string &url, ...@@ -144,7 +148,27 @@ std::string LLWeb::expandURLSubstitutions(const std::string &url,
substitution["LANGUAGE"] = LLUI::getLanguage(); substitution["LANGUAGE"] = LLUI::getLanguage();
substitution["GRID"] = LLViewerLogin::getInstance()->getGridLabel(); substitution["GRID"] = LLViewerLogin::getInstance()->getGridLabel();
substitution["OS"] = LLAppViewer::instance()->getOSInfo().getOSStringSimple(); substitution["OS"] = LLAppViewer::instance()->getOSInfo().getOSStringSimple();
substitution["SESSION_ID"] = gAgent.getSessionID();
// find the region ID
LLUUID region_id;
LLViewerRegion *region = gAgent.getRegion();
if (region)
{
region_id = region->getRegionID();
}
substitution["REGION_ID"] = region_id;
// find the parcel ID
LLUUID parcel_id;
LLParcel* parcel = LLViewerParcelMgr::getInstance()->getAgentParcel();
if (parcel)
{
parcel_id = parcel->getID();
}
substitution["PARCEL_ID"] = parcel_id;
// expand all of the substitution strings and escape the url
std::string expanded_url = url; std::string expanded_url = url;
LLStringUtil::format(expanded_url, substitution); LLStringUtil::format(expanded_url, substitution);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment