From 8cc430f691fe65cd03cbac1c4246d836000babd1 Mon Sep 17 00:00:00 2001
From: Leyla Farazha <leyla@lindenlab.com>
Date: Tue, 3 May 2011 17:11:58 -0700
Subject: [PATCH] EXP-624 Place profile floater may be opened by SLApp

---
 indra/newview/app_settings/settings.xml          | 11 +++++++++++
 indra/newview/app_settings/settings_minimal.xml  | 11 +++++++++++
 indra/newview/llpanelplaces.cpp                  |  9 ++++++++-
 .../skins/default/xui/en/notifications.xml       | 16 +++++++++++++++-
 4 files changed, 45 insertions(+), 2 deletions(-)

diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index 6b56da5edd7..a9eb45b14c0 100644
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -12546,6 +12546,17 @@
       <string>Boolean</string>
       <key>Value</key>
       <integer>1</integer>
+    </map>    
+    <key>EnablePlaceProfile</key>
+    <map>
+      <key>Comment</key>
+      <string>Enable viewing of place profile from web link</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Boolean</string>
+      <key>Value</key>
+      <integer>1</integer>
     </map>
     <key>EnablePicks</key>
     <map>
diff --git a/indra/newview/app_settings/settings_minimal.xml b/indra/newview/app_settings/settings_minimal.xml
index 2180abdcee0..1e9c3f54fd7 100644
--- a/indra/newview/app_settings/settings_minimal.xml
+++ b/indra/newview/app_settings/settings_minimal.xml
@@ -248,6 +248,17 @@
       <key>Value</key>
       <integer>0</integer>
     </map>
+    <key>EnablePlaceProfile</key>
+    <map>
+      <key>Comment</key>
+      <string>Enable viewing of place profile from web link</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Boolean</string>
+      <key>Value</key>
+      <integer>0</integer>
+    </map>
     <key>EnablePicks</key>
     <map>
       <key>Comment</key>
diff --git a/indra/newview/llpanelplaces.cpp b/indra/newview/llpanelplaces.cpp
index 00ac34efa5c..46262832dcd 100644
--- a/indra/newview/llpanelplaces.cpp
+++ b/indra/newview/llpanelplaces.cpp
@@ -91,11 +91,18 @@ class LLParcelHandler : public LLCommandHandler
 	LLParcelHandler() : LLCommandHandler("parcel", UNTRUSTED_THROTTLE) { }
 	bool handle(const LLSD& params, const LLSD& query_map,
 				LLMediaCtrl* web)
-	{
+	{		
 		if (params.size() < 2)
 		{
 			return false;
 		}
+
+		if (!LLUI::sSettingGroups["config"]->getBOOL("EnablePlaceProfile"))
+		{
+			LLNotificationsUtil::add("NoPlaceInfo", LLSD(), LLSD(), std::string("SwitchToStandardSkinAndQuit"));
+			return true;
+		}
+
 		LLUUID parcel_id;
 		if (!parcel_id.set(params[0], FALSE))
 		{
diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml
index 3fb3717e682..8c18d1233f8 100644
--- a/indra/newview/skins/default/xui/en/notifications.xml
+++ b/indra/newview/skins/default/xui/en/notifications.xml
@@ -7144,7 +7144,21 @@ The site at &apos;&lt;nolink&gt;[HOST_NAME]&lt;/nolink&gt;&apos; in realm &apos;
    yestext="Quit"
    notext="Don't Quit"/>
   </notification>
-
+  
+  <notification
+ name="NoPlaceInfo"
+ label=""
+ type="alertmodal"
+ unique="true">
+    <tag>fail</tag>
+    <tag>confirm</tag>
+    Viewing place profile is only available in Advanced mode. Would you like to quit and change modes? The mode selector can be found on the login screen.
+    <usetemplate
+   name="okcancelbuttons"
+   yestext="Quit"
+   notext="Don't Quit"/>
+  </notification>
+  
   <notification
  name="NoPicks"
  label=""
-- 
GitLab