diff options
author | Meik Sievertsen <acydburn@phpbb.com> | 2007-01-17 18:41:49 +0000 |
---|---|---|
committer | Meik Sievertsen <acydburn@phpbb.com> | 2007-01-17 18:41:49 +0000 |
commit | a841fe70a8234bf158165105339e32aa5ceb75a2 (patch) | |
tree | a3e85eb75ec6bb59b331bd830667532d4511a868 /phpBB/memberlist.php | |
parent | 708113b790368fffbf57eb5b96c8132eda00ba9c (diff) | |
download | forums-a841fe70a8234bf158165105339e32aa5ceb75a2.tar forums-a841fe70a8234bf158165105339e32aa5ceb75a2.tar.gz forums-a841fe70a8234bf158165105339e32aa5ceb75a2.tar.bz2 forums-a841fe70a8234bf158165105339e32aa5ceb75a2.tar.xz forums-a841fe70a8234bf158165105339e32aa5ceb75a2.zip |
ok, handled some bugs... the most important being validate_username (the variable passed to validate_data([...]array('username', [...])) and updating group listings while doing relevant group actions. Oh, and PM icons are working now. :o
git-svn-id: file:///svn/phpbb/trunk@6894 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/memberlist.php')
-rw-r--r-- | phpBB/memberlist.php | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/phpBB/memberlist.php b/phpBB/memberlist.php index 13a170e357..31647cfe89 100644 --- a/phpBB/memberlist.php +++ b/phpBB/memberlist.php @@ -1202,7 +1202,7 @@ switch ($mode) 'S_SEARCH_USER' => true, 'S_FORM_NAME' => $form, 'S_FIELD_NAME' => $field, - 'S_SELECT_SINGLE' => $select_single, + 'S_SELECT_SINGLE' => $select_single, 'S_COUNT_OPTIONS' => $s_find_count, 'S_SORT_OPTIONS' => $s_sort_key, 'S_JOINED_TIME_OPTIONS' => $s_find_join_time, @@ -1239,7 +1239,8 @@ switch ($mode) $id_cache = array(); while ($row = $db->sql_fetchrow($result)) { - $row['session_time'] = (!empty($session_times[$row['user_id']])) ? $session_times[$row['user_id']] : ''; + $row['session_time'] = (!empty($session_times[$row['user_id']])) ? $session_times[$row['user_id']] : 0; + $row['last_visit'] = (!empty($row['session_time'])) ? $row['session_time'] : $row['user_lastvisit']; $id_cache[$row['user_id']] = $row; } @@ -1255,6 +1256,13 @@ switch ($mode) $profile_fields_cache = $cp->generate_profile_fields_template('grab', array_keys($id_cache)); } + // If we sort by last active date we need to adjust the id cache due to user_lastvisit not being the last active date... + if ($sort_key == 'l') + { + $lesser_than = ($sort_dir == 'a') ? -1 : 1; + uasort($id_cache, create_function('$first, $second', "return (\$first['last_visit'] == \$second['last_visit']) ? 0 : ((\$first['last_visit'] < \$second['last_visit']) ? $lesser_than : ($lesser_than * -1));")); + } + $i = 0; foreach ($id_cache as $user_id => $row) { |