summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorMerov Linden <merov@lindenlab.com>2013-08-01 21:46:37 -0700
committerMerov Linden <merov@lindenlab.com>2013-08-01 21:46:37 -0700
commitb19b2737b2965900e55485a5887815ce97aa9dd7 (patch)
treeb7bb8e5792f5161bab151b2315c1195d3f96ba81 /indra/newview
parent571ce028fdeeb21637cf3488344dfb536bc94164 (diff)
ACME-761 : Use the cap for the service url unless overridden by the SLShareHost setting from settings.xml
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llfacebookconnect.cpp17
1 files changed, 13 insertions, 4 deletions
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;
}