diff options
author | Steven Bennetts <steve@lindenlab.com> | 2008-09-23 01:53:11 +0000 |
---|---|---|
committer | Steven Bennetts <steve@lindenlab.com> | 2008-09-23 01:53:11 +0000 |
commit | afe61eb994377e25d60d0a0893510a693149c6be (patch) | |
tree | 80c6e33cd664e5c8b1c5f55c3b7b49c081dd590a /indra/newview/llgroupmgr.cpp | |
parent | 2945882258ad1befe8e8094c0a1a655e4ddbcd30 (diff) |
QAR-849 merge maint-viewer-10-merge 96838-97237 -> release
Diffstat (limited to 'indra/newview/llgroupmgr.cpp')
-rw-r--r-- | indra/newview/llgroupmgr.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/indra/newview/llgroupmgr.cpp b/indra/newview/llgroupmgr.cpp index 32ccc761f8..631b2caa91 100644 --- a/indra/newview/llgroupmgr.cpp +++ b/indra/newview/llgroupmgr.cpp @@ -52,6 +52,7 @@ #include "llfloaterdirectory.h" #include "llfloatergroupinfo.h" #include "lluictrlfactory.h" +#include <boost/regex.hpp> const U32 MAX_CACHED_GROUPS = 10; @@ -791,6 +792,20 @@ LLGroupMgrGroupData* LLGroupMgr::getGroupData(const LLUUID& id) return NULL; } +// Helper function for LLGroupMgr::processGroupMembersReply +// This reformats date strings from MM/DD/YYYY to YYYY/MM/DD ( e.g. 1/27/2008 -> 2008/1/27 ) +// so that the sorter can sort by year before month before day. +static void formatDateString(std::string &date_string) +{ + using namespace boost; + cmatch result; + const regex expression("([0-9]{1,2})/([0-9]{1,2})/([0-9]{4})"); + if (regex_match(date_string.c_str(), result, expression)) + { + date_string = result[3]+"/"+result[1]+"/"+result[2]; + } +} + // static void LLGroupMgr::processGroupMembersReply(LLMessageSystem* msg, void** data) { @@ -840,6 +855,8 @@ void LLGroupMgr::processGroupMembersReply(LLMessageSystem* msg, void** data) if (member_id.notNull()) { + formatDateString(online_status); // reformat for sorting, e.g. 12/25/2008 -> 2008/12/25 + //llinfos << "Member " << member_id << " has powers " << std::hex << agent_powers << std::dec << llendl; LLGroupMemberData* newdata = new LLGroupMemberData(member_id, contribution, |