summaryrefslogtreecommitdiff
path: root/indra/newview/llfloaterscriptlimits.cpp
diff options
context:
space:
mode:
authorandreykproductengine <akleshchev@productengine.com>2017-02-15 20:40:03 +0200
committerandreykproductengine <akleshchev@productengine.com>2017-02-15 20:40:03 +0200
commit605160d501158362ced3e62425bdcd8d28895fd5 (patch)
tree0bd0338860645e47902b9f761d6309bc46688116 /indra/newview/llfloaterscriptlimits.cpp
parent9c015df3fab0b5cc229ad1a0393e5da50ee29883 (diff)
MAINT-7118 Swapping legacy people API with new cache
Diffstat (limited to 'indra/newview/llfloaterscriptlimits.cpp')
-rw-r--r--indra/newview/llfloaterscriptlimits.cpp27
1 files changed, 23 insertions, 4 deletions
diff --git a/indra/newview/llfloaterscriptlimits.cpp b/indra/newview/llfloaterscriptlimits.cpp
index c14bb4e7ae..5f0587a286 100644
--- a/indra/newview/llfloaterscriptlimits.cpp
+++ b/indra/newview/llfloaterscriptlimits.cpp
@@ -391,6 +391,14 @@ void LLPanelScriptLimitsRegionMemory::setErrorStatus(S32 status, const std::stri
}
// callback from the name cache with an owner name to add to the list
+void LLPanelScriptLimitsRegionMemory::onAvatarNameCache(
+ const LLUUID& id,
+ const LLAvatarName& av_name)
+{
+ onNameCache(id, av_name.getUserName());
+}
+
+// callback from the name cache with an owner name to add to the list
void LLPanelScriptLimitsRegionMemory::onNameCache(
const LLUUID& id,
const std::string& full_name)
@@ -503,7 +511,9 @@ void LLPanelScriptLimitsRegionMemory::setRegionDetails(LLSD content)
}
else
{
- name_is_cached = gCacheName->getFullName(owner_id, owner_buf); // username
+ LLAvatarName av_name;
+ name_is_cached = LLAvatarNameCache::get(owner_id, &av_name);
+ owner_buf = av_name.getUserName();
owner_buf = LLCacheName::buildUsername(owner_buf);
}
if(!name_is_cached)
@@ -511,9 +521,18 @@ void LLPanelScriptLimitsRegionMemory::setRegionDetails(LLSD content)
if(std::find(names_requested.begin(), names_requested.end(), owner_id) == names_requested.end())
{
names_requested.push_back(owner_id);
- gCacheName->get(owner_id, is_group_owned, // username
- boost::bind(&LLPanelScriptLimitsRegionMemory::onNameCache,
- this, _1, _2));
+ if (is_group_owned)
+ {
+ gCacheName->getGroup(owner_id,
+ boost::bind(&LLPanelScriptLimitsRegionMemory::onNameCache,
+ this, _1, _2));
+ }
+ else
+ {
+ LLAvatarNameCache::get(owner_id,
+ boost::bind(&LLPanelScriptLimitsRegionMemory::onAvatarNameCache,
+ this, _1, _2));
+ }
}
}
}