From b19b2737b2965900e55485a5887815ce97aa9dd7 Mon Sep 17 00:00:00 2001 From: Merov Linden Date: Thu, 1 Aug 2013 21:46:37 -0700 Subject: ACME-761 : Use the cap for the service url unless overridden by the SLShareHost setting from settings.xml --- indra/newview/llfacebookconnect.cpp | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) (limited to 'indra') diff --git a/indra/newview/llfacebookconnect.cpp b/indra/newview/llfacebookconnect.cpp index 26fc480658..e4ac2a4960 100644 --- a/indra/newview/llfacebookconnect.cpp +++ b/indra/newview/llfacebookconnect.cpp @@ -40,6 +40,7 @@ #include "llimagejpeg.h" #include "lltrans.h" #include "llevents.h" +#include "llviewerregion.h" #include "llfloaterwebcontent.h" #include "llfloaterreg.h" @@ -339,13 +340,21 @@ void LLFacebookConnect::openFacebookWeb(std::string url) std::string LLFacebookConnect::getFacebookConnectURL(const std::string& route) { - //TODO GIL : Remove this code along with extern and llcontrol.h header + static std::string sFacebookConnectUrl = gAgent.getRegion()->getCapability("FacebookConnect"); + + //*TODO : Remove this code along with extern and llcontrol.h header std::string host = gSavedSettings.getString("SLShareHost"); - //static std::string sFacebookConnectUrl = gAgent.getRegion()->getCapability("FacebookConnect"); - static std::string sFacebookConnectUrl = host + "/fbc/agent/" + gAgentID.asString(); // TEMPORARY HACK FOR FB DEMO - Cho + if (!host.empty()) + { + sFacebookConnectUrl = host + "/fbc/agent/" + gAgentID.asString(); // TEMPORARY HACK FOR FB DEMO - Cho + } + else + { + sFacebookConnectUrl = gAgent.getRegion()->getCapability("FacebookConnect"); + } + //End removable part std::string url = sFacebookConnectUrl + route; - llinfos << url << llendl; return url; } -- cgit v1.2.3