summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorLynx Linden <lynx@lindenlab.com>2009-12-23 17:14:27 +0000
committerLynx Linden <lynx@lindenlab.com>2009-12-23 17:14:27 +0000
commite3211c4ac1830d5f480cc8206aad932fd0505e21 (patch)
tree19d165fdb498df54d8eea66a959140a679b0d0e0 /indra/newview
parent840b8b04b2f575edb74588041a1b2763fae3a607 (diff)
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.
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/app_settings/settings.xml2
-rw-r--r--indra/newview/llweb.cpp24
2 files changed, 25 insertions, 1 deletions
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index 455c3587ff..ff7c2b1f5e 100644
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -3585,7 +3585,7 @@
<key>Type</key>
<string>String</string>
<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>
<key>HighResSnapshot</key>
<map>
diff --git a/indra/newview/llweb.cpp b/indra/newview/llweb.cpp
index f8bb7336db..7866f735c5 100644
--- a/indra/newview/llweb.cpp
+++ b/indra/newview/llweb.cpp
@@ -38,10 +38,12 @@
// Library includes
#include "llwindow.h" // spawnWebBrowser()
+#include "llagent.h"
#include "llappviewer.h"
#include "llfloatermediabrowser.h"
#include "llfloaterreg.h"
#include "lllogininstance.h"
+#include "llparcel.h"
#include "llsd.h"
#include "lltoastalertpanel.h"
#include "llui.h"
@@ -49,6 +51,8 @@
#include "llversioninfo.h"
#include "llviewercontrol.h"
#include "llviewernetwork.h"
+#include "llviewerparcelmgr.h"
+#include "llviewerregion.h"
#include "llviewerwindow.h"
class URLLoader : public LLToastAlertPanel::URLLoader
@@ -144,7 +148,27 @@ std::string LLWeb::expandURLSubstitutions(const std::string &url,
substitution["LANGUAGE"] = LLUI::getLanguage();
substitution["GRID"] = LLViewerLogin::getInstance()->getGridLabel();
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;
LLStringUtil::format(expanded_url, substitution);