summaryrefslogtreecommitdiff
path: root/indra/newview/llagentlanguage.cpp
diff options
context:
space:
mode:
authorGlenn Glazer <coyot@lindenlab.com>2016-04-07 12:10:13 -0700
committerGlenn Glazer <coyot@lindenlab.com>2016-04-07 12:10:13 -0700
commit369cefd5b3f2f52ae0dd203fcd45a4618f74b0f3 (patch)
tree941d27a32099abaf71bae8a2865002e2b25a3512 /indra/newview/llagentlanguage.cpp
parent0494a502aafac73800352dc26c4eb3a27b02a8ce (diff)
parent18928ea6c6f2830a0d45ec412c915eceff1b76b0 (diff)
pull from viewer-release
Diffstat (limited to 'indra/newview/llagentlanguage.cpp')
-rwxr-xr-xindra/newview/llagentlanguage.cpp24
1 files changed, 10 insertions, 14 deletions
diff --git a/indra/newview/llagentlanguage.cpp b/indra/newview/llagentlanguage.cpp
index fe6236a32a..cdb0e3302d 100755
--- a/indra/newview/llagentlanguage.cpp
+++ b/indra/newview/llagentlanguage.cpp
@@ -32,6 +32,7 @@
#include "llviewerregion.h"
// library includes
#include "llui.h" // getLanguage()
+#include "httpcommon.h"
// static
void LLAgentLanguage::init()
@@ -54,22 +55,17 @@ void LLAgentLanguage::onChange()
// static
bool LLAgentLanguage::update()
{
- LLSD body;
- std::string url;
+ LLSD body;
- if (gAgent.getRegion())
- {
- url = gAgent.getRegion()->getCapability("UpdateAgentLanguage");
- }
-
- if (!url.empty())
- {
- std::string language = LLUI::getLanguage();
+ std::string language = LLUI::getLanguage();
- body["language"] = language;
- body["language_is_public"] = gSavedSettings.getBOOL("LanguageIsPublic");
+ body["language"] = language;
+ body["language_is_public"] = gSavedSettings.getBOOL("LanguageIsPublic");
- LLHTTPClient::post(url, body, new LLHTTPClient::Responder);
- }
+ if (!gAgent.requestPostCapability("UpdateAgentLanguage", body))
+ {
+ LL_WARNS("Language") << "Language capability unavailable." << LL_ENDL;
+ }
+
return true;
}