diff options
Diffstat (limited to 'indra/newview/llagentlanguage.cpp')
-rwxr-xr-x | indra/newview/llagentlanguage.cpp | 27 |
1 files changed, 9 insertions, 18 deletions
diff --git a/indra/newview/llagentlanguage.cpp b/indra/newview/llagentlanguage.cpp index 66aec42417..cdb0e3302d 100755 --- a/indra/newview/llagentlanguage.cpp +++ b/indra/newview/llagentlanguage.cpp @@ -55,26 +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"); - LLCore::HttpHandle handle = gAgent.requestPostCapability("UpdateAgentLanguage", url, body); - if (handle == LLCORE_HTTP_HANDLE_INVALID) - { - LL_WARNS() << "Unable to change language." << LL_ENDL; - } - } + if (!gAgent.requestPostCapability("UpdateAgentLanguage", body)) + { + LL_WARNS("Language") << "Language capability unavailable." << LL_ENDL; + } + return true; } |