1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-24 09:12:56 +02:00

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
This commit is contained in:
Meik Sievertsen
2007-01-17 18:41:49 +00:00
parent 708113b790
commit a841fe70a8
42 changed files with 243 additions and 226 deletions

View File

@@ -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)
{