diff options
author | Jacek Antonelli | 2008-12-01 17:39:58 -0600 |
---|---|---|
committer | Jacek Antonelli | 2008-12-01 17:40:06 -0600 |
commit | 7abecb48babe6a6f09bf6692ba55076546cfced9 (patch) | |
tree | 8d18a88513fb97adf32c10aae78f4be1984942db /linden/indra/newview/llgroupmgr.cpp | |
parent | Second Life viewer sources 1.21.6 (diff) | |
download | meta-impy-7abecb48babe6a6f09bf6692ba55076546cfced9.zip meta-impy-7abecb48babe6a6f09bf6692ba55076546cfced9.tar.gz meta-impy-7abecb48babe6a6f09bf6692ba55076546cfced9.tar.bz2 meta-impy-7abecb48babe6a6f09bf6692ba55076546cfced9.tar.xz |
Second Life viewer sources 1.22.0-RC
Diffstat (limited to '')
-rw-r--r-- | linden/indra/newview/llgroupmgr.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/linden/indra/newview/llgroupmgr.cpp b/linden/indra/newview/llgroupmgr.cpp index 30b7cbd..35d408b 100644 --- a/linden/indra/newview/llgroupmgr.cpp +++ b/linden/indra/newview/llgroupmgr.cpp | |||
@@ -52,6 +52,7 @@ | |||
52 | #include "llfloaterdirectory.h" | 52 | #include "llfloaterdirectory.h" |
53 | #include "llfloatergroupinfo.h" | 53 | #include "llfloatergroupinfo.h" |
54 | #include "lluictrlfactory.h" | 54 | #include "lluictrlfactory.h" |
55 | #include <boost/regex.hpp> | ||
55 | 56 | ||
56 | 57 | ||
57 | const U32 MAX_CACHED_GROUPS = 10; | 58 | const U32 MAX_CACHED_GROUPS = 10; |
@@ -791,6 +792,20 @@ LLGroupMgrGroupData* LLGroupMgr::getGroupData(const LLUUID& id) | |||
791 | return NULL; | 792 | return NULL; |
792 | } | 793 | } |
793 | 794 | ||
795 | // Helper function for LLGroupMgr::processGroupMembersReply | ||
796 | // This reformats date strings from MM/DD/YYYY to YYYY/MM/DD ( e.g. 1/27/2008 -> 2008/1/27 ) | ||
797 | // so that the sorter can sort by year before month before day. | ||
798 | static void formatDateString(std::string &date_string) | ||
799 | { | ||
800 | using namespace boost; | ||
801 | cmatch result; | ||
802 | const regex expression("([0-9]{1,2})/([0-9]{1,2})/([0-9]{4})"); | ||
803 | if (regex_match(date_string.c_str(), result, expression)) | ||
804 | { | ||
805 | date_string = result[3]+"/"+result[1]+"/"+result[2]; | ||
806 | } | ||
807 | } | ||
808 | |||
794 | // static | 809 | // static |
795 | void LLGroupMgr::processGroupMembersReply(LLMessageSystem* msg, void** data) | 810 | void LLGroupMgr::processGroupMembersReply(LLMessageSystem* msg, void** data) |
796 | { | 811 | { |
@@ -840,6 +855,8 @@ void LLGroupMgr::processGroupMembersReply(LLMessageSystem* msg, void** data) | |||
840 | 855 | ||
841 | if (member_id.notNull()) | 856 | if (member_id.notNull()) |
842 | { | 857 | { |
858 | formatDateString(online_status); // reformat for sorting, e.g. 12/25/2008 -> 2008/12/25 | ||
859 | |||
843 | //llinfos << "Member " << member_id << " has powers " << std::hex << agent_powers << std::dec << llendl; | 860 | //llinfos << "Member " << member_id << " has powers " << std::hex << agent_powers << std::dec << llendl; |
844 | LLGroupMemberData* newdata = new LLGroupMemberData(member_id, | 861 | LLGroupMemberData* newdata = new LLGroupMemberData(member_id, |
845 | contribution, | 862 | contribution, |