diff options
author | Rider Linden <none@none> | 2015-04-17 08:59:25 -0700 |
---|---|---|
committer | Rider Linden <none@none> | 2015-04-17 08:59:25 -0700 |
commit | 737037309fd4ca3ccc0f03bc5bc9a02a1d610a96 (patch) | |
tree | bff298b28b4878a811a7a2b4be1cc8ed4add06d1 /indra | |
parent | 6b8fecb8b084ebe054fb0314d34e04f48fe48b1e (diff) |
Replace a couple of changes that I didn't mean to remove.
Diffstat (limited to 'indra')
-rwxr-xr-x | indra/llxml/llcontrol.h | 2 | ||||
-rwxr-xr-x | indra/newview/llviewerregion.cpp | 41 |
2 files changed, 42 insertions, 1 deletions
diff --git a/indra/llxml/llcontrol.h b/indra/llxml/llcontrol.h index 8116adeae2..04575d81e0 100755 --- a/indra/llxml/llcontrol.h +++ b/indra/llxml/llcontrol.h @@ -256,7 +256,7 @@ public: } else { - LL_WARNS_ONCE() << "Control " << name << " not found." << LL_ENDL; + LL_WARNS() << "Control " << name << " not found." << LL_ENDL; return T(); } return convert_from_llsd<T>(value, type, name); diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp index 36dd778746..9b26f5c2e1 100755 --- a/indra/newview/llviewerregion.cpp +++ b/indra/newview/llviewerregion.cpp @@ -108,6 +108,47 @@ typedef std::map<std::string, std::string> CapabilityMap; static void log_capabilities(const CapabilityMap &capmap); +// support for secondlife:///app/region/{REGION} SLapps
+// N.B. this is defined to work exactly like the classic secondlife://{REGION}
+// However, the later syntax cannot support spaces in the region name because
+// spaces (and %20 chars) are illegal in the hostname of an http URL. Some
+// browsers let you get away with this, but some do not (such as Qt's Webkit).
+// Hence we introduced the newer secondlife:///app/region alternative.
+class LLRegionHandler : public LLCommandHandler
+{
+public:
+ // requests will be throttled from a non-trusted browser
+ LLRegionHandler() : LLCommandHandler("region", UNTRUSTED_THROTTLE) {}
+
+ bool handle(const LLSD& params, const LLSD& query_map, LLMediaCtrl* web)
+ {
+ // make sure that we at least have a region name
+ int num_params = params.size();
+ if (num_params < 1)
+ {
+ return false;
+ }
+
+ // build a secondlife://{PLACE} SLurl from this SLapp
+ std::string url = "secondlife://";
+ for (int i = 0; i < num_params; i++)
+ {
+ if (i > 0)
+ {
+ url += "/";
+ }
+ url += params[i].asString();
+ }
+
+ // Process the SLapp as if it was a secondlife://{PLACE} SLurl
+ LLURLDispatcher::dispatch(url, "clicked", web, true);
+ return true;
+ }
+
+};
+LLRegionHandler gRegionHandler;
+ + class LLViewerRegionImpl { public: |