From 0e5cc91d6bdcef2e50fd8f04b4d5fe2249015f24 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Wed, 17 Jun 2009 12:17:19 +0000 Subject: Fix bug #22665 - Display and highlight already used rank images while assigning new rank Authorised by: acydburn git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@9607 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/docs/CHANGELOG.html | 1 + phpBB/includes/acp/acp_ranks.php | 31 ++++++++++++++----------------- phpBB/language/en/acp/posting.php | 1 + 3 files changed, 16 insertions(+), 17 deletions(-) diff --git a/phpBB/docs/CHANGELOG.html b/phpBB/docs/CHANGELOG.html index 651cb54fa7..1df5930862 100644 --- a/phpBB/docs/CHANGELOG.html +++ b/phpBB/docs/CHANGELOG.html @@ -115,6 +115,7 @@
  • [Fix] Exclude forum from active topics option is ignored (Bug #19135 - Patch by nickvergessen)
  • [Fix] Do not display birthdays of banned users (Bug #20625 - Patch by nickvergessen)
  • [Fix] Fix function to recalculate Nested Sets (Bug #41555 - Patch by EXreaction)
  • +
  • [Fix] Already used rank-images missing in image-list when creating new rank (Bug #22665 - Patch by nickvergessen)
  • [Change] Change the data format of the default file ACM to be more secure from tampering and have better performance.
  • [Change] Add index on log_time to the log table to prevent slowdown on boards with many log entries. (Bug #44665 - Patch by bantu)
  • [Change] Template engine now permits to a limited extent variable includes.
  • diff --git a/phpBB/includes/acp/acp_ranks.php b/phpBB/includes/acp/acp_ranks.php index 41ed5b0fba..a1a10545ef 100644 --- a/phpBB/includes/acp/acp_ranks.php +++ b/phpBB/includes/acp/acp_ranks.php @@ -168,25 +168,22 @@ class acp_ranks { $img = $path . $img; - if (!in_array($img, $existing_imgs) || $action == 'edit') + if ($ranks && $img == $ranks['rank_image']) { - if ($ranks && $img == $ranks['rank_image']) - { - $selected = ' selected="selected"'; - $edit_img = $img; - } - else - { - $selected = ''; - } - - if (strlen($img) > 255) - { - continue; - } - - $filename_list .= ''; + $selected = ' selected="selected"'; + $edit_img = $img; } + else + { + $selected = ''; + } + + if (strlen($img) > 255) + { + continue; + } + + $filename_list .= ''; } } diff --git a/phpBB/language/en/acp/posting.php b/phpBB/language/en/acp/posting.php index 01453b85ef..cfb626d186 100644 --- a/phpBB/language/en/acp/posting.php +++ b/phpBB/language/en/acp/posting.php @@ -217,6 +217,7 @@ $lang = array_merge($lang, array( 'RANK_ADDED' => 'The rank was successfully added.', 'RANK_IMAGE' => 'Rank image', 'RANK_IMAGE_EXPLAIN' => 'Use this to define a small image associated with the rank. The path is relative to the root phpBB directory.', + 'RANK_IMAGE_IN_USE' => '(In use)', 'RANK_MINIMUM' => 'Minimum posts', 'RANK_REMOVED' => 'The rank was successfully deleted.', 'RANK_SPECIAL' => 'Set as special rank', -- cgit v1.2.1