diff options
author | Rider Linden <rider@lindenlab.com> | 2015-06-08 17:29:01 -0700 |
---|---|---|
committer | Rider Linden <rider@lindenlab.com> | 2015-06-08 17:29:01 -0700 |
commit | cf4fec954ca46a139465144ccc3888b8fc7d41da (patch) | |
tree | e985921e60f39913f6a20c8eb2b16e8f9fb968b6 /indra/newview/llagentlanguage.cpp | |
parent | ce2fc7d775d313a7dfe528b9c09a1d03ad077b50 (diff) |
Added a way to pass a policy Id to the coroadapter.
Changed language, appearance, and maturity to conform to use the adapter rather than the SDHandler
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; } |