summaryrefslogtreecommitdiff
path: root/indra/newview/llnamelistctrl.cpp
diff options
context:
space:
mode:
authorDon Kjer <don@lindenlab.com>2007-04-04 22:29:45 +0000
committerDon Kjer <don@lindenlab.com>2007-04-04 22:29:45 +0000
commit170d61d2003b28b6d9a06171e3b33e8cd16aa85e (patch)
tree180ee0ddc1fc2c8c4cbab8d1fe4270878736584d /indra/newview/llnamelistctrl.cpp
parent98740db8fd5875033d08b6aef6d9bf5c3c49eeee (diff)
svn merge svn+ssh://svn/svn/linden/branches/maintenance -r 59998:59999 into release
Fix for groups showing up as 'nobody'
Diffstat (limited to 'indra/newview/llnamelistctrl.cpp')
-rw-r--r--indra/newview/llnamelistctrl.cpp20
1 files changed, 14 insertions, 6 deletions
diff --git a/indra/newview/llnamelistctrl.cpp b/indra/newview/llnamelistctrl.cpp
index eabb9e0b23..d8c2987470 100644
--- a/indra/newview/llnamelistctrl.cpp
+++ b/indra/newview/llnamelistctrl.cpp
@@ -175,13 +175,21 @@ LLScrollListItem* LLNameListCtrl::addElement(const LLSD& value, EAddPosition pos
char first[DB_FIRST_NAME_BUF_SIZE]; /*Flawfinder: ignore*/
char last[DB_LAST_NAME_BUF_SIZE]; /*Flawfinder: ignore*/
- gCacheName->getName(item->getUUID(), first, last);
-
LLString fullname;
- fullname.assign(first);
- fullname.append(1, ' ');
- fullname.append(last);
-
+ if (gCacheName->getName(item->getUUID(), first, last))
+ {
+ fullname.assign(first);
+ fullname.append(1, ' ');
+ fullname.append(last);
+ }
+ else // didn't work as a resident name, try looking up as a group
+ {
+ char group_name[DB_GROUP_NAME_BUF_SIZE]; /*Flawfinder: ignore*/
+ gCacheName->getGroupName(item->getUUID(), group_name);
+ // fullname will be "nobody" if group not found
+ fullname = group_name;
+ }
+
LLScrollListCell* cell = (LLScrollListCell*)item->getColumn(mNameColumnIndex);
((LLScrollListText*)cell)->setText( fullname );