From 5f4764c785becf7344f48b02afd764a37b820d4c Mon Sep 17 00:00:00 2001
From: Martin Reddy <lynx@lindenlab.com>
Date: Mon, 14 Sep 2009 11:49:01 +0000
Subject: [PATCH] DEV-39188: clicking on unsupported secondlife:///app/ SLURLs
 now brings up a notification telling you this; rather than displaying the
 Place side panel with N/A information.

Now, if you click on an Event or Classified SLURL, you get this
unsupported alert (2.0 does not have side panels for these types
of assets, instead they are integrated into Search).
---
 indra/newview/llurldispatcher.cpp                    | 12 ++++++++++--
 indra/newview/skins/default/xui/en/notifications.xml |  8 ++++++++
 2 files changed, 18 insertions(+), 2 deletions(-)

diff --git a/indra/newview/llurldispatcher.cpp b/indra/newview/llurldispatcher.cpp
index cb68045310a..4cdeca7707f 100644
--- a/indra/newview/llurldispatcher.cpp
+++ b/indra/newview/llurldispatcher.cpp
@@ -158,7 +158,8 @@ bool LLURLDispatcherImpl::dispatchApp(const std::string& url,
 									  LLMediaCtrl* web,
 									  bool trusted_browser)
 {
-	if (!LLSLURL::isSLURL(url))
+	// ensure the URL is in the secondlife:///app/ format
+	if (!LLSLURL::isSLURLCommand(url))
 	{
 		return false;
 	}
@@ -170,7 +171,14 @@ bool LLURLDispatcherImpl::dispatchApp(const std::string& url,
 	pathArray.erase(0); // erase "cmd"
 	bool handled = LLCommandDispatcher::dispatch(
 			cmd, pathArray, uri.queryMap(), web, trusted_browser);
-	return handled;
+
+	// alert if we didn't handle this secondlife:///app/ SLURL
+	// (but still return true because it is a valid app SLURL)
+	if (! handled)
+	{
+		LLNotifications::instance().add("UnsupportedCommandSLURL");
+	}
+	return true;
 }
 
 // static
diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml
index 8b20918700c..1f0578f8192 100644
--- a/indra/newview/skins/default/xui/en/notifications.xml
+++ b/indra/newview/skins/default/xui/en/notifications.xml
@@ -6501,6 +6501,14 @@ Click Accept to join the chat or Decline to decline the invitation. Click Block
     The link you clicked cannot be opened from this web browser.
   </notification>
 
+  <notification
+   icon="notifytip.tga"
+   name="UnsupportedCommandSLURL"
+   priority="high"
+   type="notifytip">
+    The SLURL you clicked on is not supported.
+  </notification>
+
   <notification name="IMToast" type="notifytoast">
     [MESSAGE]
     <form name="form">
-- 
GitLab