aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/memberlist.php
diff options
context:
space:
mode:
authorOleg Pudeyev <oleg@bsdpower.com>2012-04-03 20:57:24 -0400
committerOleg Pudeyev <oleg@bsdpower.com>2012-04-03 20:57:24 -0400
commit14e727b8345e7933662a2b363736866966996839 (patch)
treeeed223f7ed6084d8da1ba6d57efea0338ece7be2 /phpBB/memberlist.php
parent51bc9540cf10d41b34ff5f6afb90697557f4d050 (diff)
parentbb7e86c2b1920c5820d4c9cca7ec76bd25835fa1 (diff)
downloadforums-14e727b8345e7933662a2b363736866966996839.tar
forums-14e727b8345e7933662a2b363736866966996839.tar.gz
forums-14e727b8345e7933662a2b363736866966996839.tar.bz2
forums-14e727b8345e7933662a2b363736866966996839.tar.xz
forums-14e727b8345e7933662a2b363736866966996839.zip
Merge remote-tracking branch 'bantu/ticket/10658' into develop-olympus
* bantu/ticket/10658: [ticket/10658] Do not fetch ranks into the $ranks array, it is no longer used. [ticket/10658] Use get_user_rank() for group ranks on group view.
Diffstat (limited to 'phpBB/memberlist.php')
-rw-r--r--phpBB/memberlist.php20
1 files changed, 5 insertions, 15 deletions
diff --git a/phpBB/memberlist.php b/phpBB/memberlist.php
index 2a2ee407a0..7e510a3368 100644
--- a/phpBB/memberlist.php
+++ b/phpBB/memberlist.php
@@ -62,11 +62,6 @@ $default_key = 'c';
$sort_key = request_var('sk', $default_key);
$sort_dir = request_var('sd', 'a');
-
-// Grab rank information for later
-$ranks = $cache->obtain_ranks();
-
-
// What do you want to do today? ... oops, I think that line is taken ...
switch ($mode)
{
@@ -1221,21 +1216,16 @@ switch ($mode)
// Misusing the avatar function for displaying group avatars...
$avatar_img = get_user_avatar($group_row['group_avatar'], $group_row['group_avatar_type'], $group_row['group_avatar_width'], $group_row['group_avatar_height'], 'GROUP_AVATAR');
+ // ... same for group rank
$rank_title = $rank_img = $rank_img_src = '';
if ($group_row['group_rank'])
{
- if (isset($ranks['special'][$group_row['group_rank']]))
+ get_user_rank($group_row['group_rank'], false, $rank_title, $rank_img, $rank_img_src);
+
+ if ($rank_img)
{
- $rank_title = $ranks['special'][$group_row['group_rank']]['rank_title'];
+ $rank_img .= '<br />';
}
- $rank_img = (!empty($ranks['special'][$group_row['group_rank']]['rank_image'])) ? '<img src="' . $config['ranks_path'] . '/' . $ranks['special'][$group_row['group_rank']]['rank_image'] . '" alt="' . $ranks['special'][$group_row['group_rank']]['rank_title'] . '" title="' . $ranks['special'][$group_row['group_rank']]['rank_title'] . '" /><br />' : '';
- $rank_img_src = (!empty($ranks['special'][$group_row['group_rank']]['rank_image'])) ? $config['ranks_path'] . '/' . $ranks['special'][$group_row['group_rank']]['rank_image'] : '';
- }
- else
- {
- $rank_title = '';
- $rank_img = '';
- $rank_img_src = '';
}
$template->assign_vars(array(