diff options
author | Meik Sievertsen <acydburn@phpbb.com> | 2008-11-22 20:26:09 +0000 |
---|---|---|
committer | Meik Sievertsen <acydburn@phpbb.com> | 2008-11-22 20:26:09 +0000 |
commit | e02c3e3b4aeb0a0588cacb4d96ef3d8c4ba0ef8a (patch) | |
tree | 4c6c73bb6bde56f6b030a2c13a72f99f8b2cec9d | |
parent | d2f4a17ebf957e570bc8a47619f1d0ca11966b68 (diff) | |
download | forums-e02c3e3b4aeb0a0588cacb4d96ef3d8c4ba0ef8a.tar forums-e02c3e3b4aeb0a0588cacb4d96ef3d8c4ba0ef8a.tar.gz forums-e02c3e3b4aeb0a0588cacb4d96ef3d8c4ba0ef8a.tar.bz2 forums-e02c3e3b4aeb0a0588cacb4d96ef3d8c4ba0ef8a.tar.xz forums-e02c3e3b4aeb0a0588cacb4d96ef3d8c4ba0ef8a.zip |
Only display special ranks to guests; no longer display normal ranks for guests (Bug #36735)
[a bit ugly, but retains backward compatibility]
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@9082 89ea8834-ac86-4346-8a33-228a782c2dd0
-rw-r--r-- | phpBB/docs/CHANGELOG.html | 1 | ||||
-rw-r--r-- | phpBB/includes/functions_display.php | 3 | ||||
-rw-r--r-- | phpBB/memberlist.php | 4 | ||||
-rw-r--r-- | phpBB/viewtopic.php | 2 |
4 files changed, 6 insertions, 4 deletions
diff --git a/phpBB/docs/CHANGELOG.html b/phpBB/docs/CHANGELOG.html index 483d97491c..6b389b9f17 100644 --- a/phpBB/docs/CHANGELOG.html +++ b/phpBB/docs/CHANGELOG.html @@ -92,6 +92,7 @@ <li>[Fix] Fix header list build for replying oldest PM in PM history (Bug #37275)</li> <li>[Fix] Do not display COPPA group in memberlist find member dialog if COPPA disabled (Bug #37175)</li> <li>[Fix] Do not try to send jabber notifications if no jid entered (Bug #36775)</li> + <li>[Fix] Only display special ranks to guests; no longer display normal ranks for guests (Bug #36735)</li> </ul> <a name="v302"></a><h3>1.ii. Changes since 3.0.2</h3> diff --git a/phpBB/includes/functions_display.php b/phpBB/includes/functions_display.php index 44bd0214fa..14ab079202 100644 --- a/phpBB/includes/functions_display.php +++ b/phpBB/includes/functions_display.php @@ -1150,6 +1150,7 @@ function watch_topic_forum($mode, &$s_watching, $user_id, $forum_id, $topic_id, * @param string &$rank_img the rank image as full img tag is stored here after execution * @param string &$rank_img_src the rank image source is stored here after execution * +* Note: since we do not want to break backwards-compatibility, this function will only properly assign ranks to guests if you call it for them with user_posts == false */ function get_user_rank($user_rank, $user_posts, &$rank_title, &$rank_img, &$rank_img_src) { @@ -1167,7 +1168,7 @@ function get_user_rank($user_rank, $user_posts, &$rank_title, &$rank_img, &$rank $rank_img = (!empty($ranks['special'][$user_rank]['rank_image'])) ? '<img src="' . $phpbb_root_path . $config['ranks_path'] . '/' . $ranks['special'][$user_rank]['rank_image'] . '" alt="' . $ranks['special'][$user_rank]['rank_title'] . '" title="' . $ranks['special'][$user_rank]['rank_title'] . '" />' : ''; $rank_img_src = (!empty($ranks['special'][$user_rank]['rank_image'])) ? $phpbb_root_path . $config['ranks_path'] . '/' . $ranks['special'][$user_rank]['rank_image'] : ''; } - else + else if ($user_posts !== false) { if (!empty($ranks['normal'])) { diff --git a/phpBB/memberlist.php b/phpBB/memberlist.php index ad2efe5229..bede7442fc 100644 --- a/phpBB/memberlist.php +++ b/phpBB/memberlist.php @@ -238,7 +238,7 @@ switch ($mode) } $rank_title = $rank_img = ''; - get_user_rank($row['user_rank'], $row['user_posts'], $rank_title, $rank_img, $rank_img_src); + get_user_rank($row['user_rank'], (($row['user_id'] == ANONYMOUS) ? false : $row['user_posts']), $rank_title, $rank_img, $rank_img_src); $template->assign_block_vars($which_row, array( 'USER_ID' => $row['user_id'], @@ -1539,7 +1539,7 @@ function show_profile($data) $user_id = $data['user_id']; $rank_title = $rank_img = $rank_img_src = ''; - get_user_rank($data['user_rank'], $data['user_posts'], $rank_title, $rank_img, $rank_img_src); + get_user_rank($data['user_rank'], (($user_id == ANONYMOUS) ? false : $data['user_posts']), $rank_title, $rank_img, $rank_img_src); if (!empty($data['user_allow_viewemail']) || $auth->acl_get('a_user')) { diff --git a/phpBB/viewtopic.php b/phpBB/viewtopic.php index 3241c9c21a..b7b130bbd1 100644 --- a/phpBB/viewtopic.php +++ b/phpBB/viewtopic.php @@ -1047,7 +1047,7 @@ while ($row = $db->sql_fetchrow($result)) 'allow_pm' => 0, ); - get_user_rank($row['user_rank'], $row['user_posts'], $user_cache[$poster_id]['rank_title'], $user_cache[$poster_id]['rank_image'], $user_cache[$poster_id]['rank_image_src']); + get_user_rank($row['user_rank'], false, $user_cache[$poster_id]['rank_title'], $user_cache[$poster_id]['rank_image'], $user_cache[$poster_id]['rank_image_src']); } else { |