From 8d47bb567cbeffff11add24c1d0e3f52ec8712b7 Mon Sep 17 00:00:00 2001
From: Cinders <cinder@cinderblocks.biz>
Date: Sun, 9 Aug 2015 10:02:35 -0600
Subject: [PATCH] Interim fix for slapps plus a currently unused function
 because i'm too lazy to remove it for a two line change

---
 indra/newview/llviewernetwork.cpp | 16 +++++++++++++++-
 indra/newview/llviewernetwork.h   |  3 +++
 2 files changed, 18 insertions(+), 1 deletion(-)

diff --git a/indra/newview/llviewernetwork.cpp b/indra/newview/llviewernetwork.cpp
index 4a8fd020d4..0af795d64b 100755
--- a/indra/newview/llviewernetwork.cpp
+++ b/indra/newview/llviewernetwork.cpp
@@ -656,6 +656,18 @@ std::string LLGridManager::getGrid(const std::string& grid) const
 	return grid_name;
 }
 
+std::string LLGridManager::getGridByProbing(const std::string& identifier) const
+{
+	std::string grid = LLStringUtil::null;
+	grid = getGridByAttribute(GRID_VALUE, identifier);
+	if (!grid.empty()) return grid;
+	grid = getGridByAttribute(GRID_ID_VALUE, identifier);
+	if (!grid.empty()) return grid;
+	grid = getGridByAttribute(GRID_GATEKEEPER, identifier);
+	if (!grid.empty()) return grid;
+	return grid;
+}
+
 std::string LLGridManager::getGridByAttribute(const std::string& attribute, const std::string& value) const
 {
 	if (attribute.empty() || value.empty()) return LLStringUtil::null;
@@ -958,7 +970,9 @@ std::string LLGridManager::getAppSLURLBase(const std::string& grid) const
 		}
 		else
 		{
-			grid_base = llformat(DEFAULT_APP_SLURL_BASE, grid_name.c_str());
+			// *FIXME: Revert this when slurls are fixed!
+			//grid_base = llformat(DEFAULT_APP_SLURL_BASE, grid_name.c_str());
+			grid_base = SYSTEM_GRID_APP_SLURL_BASE;
 		}
 	}
 	LL_DEBUGS("GridManager")<<"returning '"<<grid_base<<"'"<<LL_ENDL;
diff --git a/indra/newview/llviewernetwork.h b/indra/newview/llviewernetwork.h
index f1b6e79f70..0a71a5b912 100755
--- a/indra/newview/llviewernetwork.h
+++ b/indra/newview/llviewernetwork.h
@@ -90,6 +90,9 @@ class LLGridManager : public LLSingleton<LLGridManager>
 	/// Return the name of a grid, given either its name or its id
 	std::string getGrid(const std::string& grid) const;
 	
+	/// Returns the grid value by probing attributes
+	std::string getGridByProbing(const std::string& identifier) const;
+	
 	/// Return the grid value by attribute
 	std::string getGridByAttribute(const std::string& attribute, const std::string& value) const;
 
-- 
GitLab