summaryrefslogtreecommitdiff
path: root/indra/newview/llagentlanguage.cpp
diff options
context:
space:
mode:
authorAndreyL ProductEngine <alihatskiy@productengine.com>2016-04-01 06:18:49 +0300
committerAndreyL ProductEngine <alihatskiy@productengine.com>2016-04-01 06:18:49 +0300
commit0ff6fa576a653597d0e9dda7f1de5f568e8d6829 (patch)
tree21e1b8f1253eedc1cc844553dcf46fef390d5a7d /indra/newview/llagentlanguage.cpp
parenta04341efaa63cd6bc47db25c1e4b4bf1e31d90a8 (diff)
parenteb413ec41e6ee49055464a636a73a7243c172c67 (diff)
Merged in lindenlab/viewer-bear
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;
}