diff --git a/phpBB/admin/admin_ranks.php b/phpBB/admin/admin_ranks.php index b6aa54c6bc..1a2cfcee63 100644 --- a/phpBB/admin/admin_ranks.php +++ b/phpBB/admin/admin_ranks.php @@ -8,7 +8,6 @@ * * $Id$ * - * ***************************************************************************/ /*************************************************************************** @@ -162,8 +161,19 @@ if( $mode != "" ) } } - if( $rank_id ) + if ($rank_id) { + if (!$special_rank) + { + $sql = "UPDATE " . USERS_TABLE . " + SET user_rank = 0 + WHERE user_rank = $rank_id"; + + if( !$result = $db->sql_query($sql) ) + { + message_die(GENERAL_ERROR, $lang['No_update_ranks'], "", __LINE__, __FILE__, $sql); + } + } $sql = "UPDATE " . RANKS_TABLE . " SET rank_title = '" . str_replace("\'", "''", $rank_title) . "', rank_special = $special_rank, rank_min = $min_posts, rank_image = '" . str_replace("\'", "''", $rank_image) . "' WHERE rank_id = $rank_id"; diff --git a/phpBB/docs/CHANGELOG.html b/phpBB/docs/CHANGELOG.html index d8acbf707e..6a43aca6e8 100644 --- a/phpBB/docs/CHANGELOG.html +++ b/phpBB/docs/CHANGELOG.html @@ -111,7 +111,8 @@ h3 {font-size:12pt;color:blue}
  • Fixed non-appending of sid to Mozilla nav bar menu items
  • Fixed incorrect profile linking from MSNM url in private messaging
  • Grammatical errors in English lang_main fixed - Cluster
  • -
  • +
  • Allow deletion of avatar and simultaneous upload/linking/gallery selection
  • +
  • Fixed non-updating of user rank when changing from special to normal rank in rank admin
  • diff --git a/phpBB/includes/usercp_register.php b/phpBB/includes/usercp_register.php index a63947cad4..f9d2aa2f11 100644 --- a/phpBB/includes/usercp_register.php +++ b/phpBB/includes/usercp_register.php @@ -97,6 +97,15 @@ if ( $strip_var_list = array('username' => 'username', 'email' => 'email', 'icq' => 'icq', 'aim' => 'aim', 'msn' => 'msn', 'yim' => 'yim', 'website' => 'website', 'location' => 'location', 'occupation' => 'occupation', 'interests' => 'interests'); +// BEFORE 2.0.4 BEFORE 2.0.4 BEFORE 2.0.4 BEFORE 2.0.4 BEFORE 2.0.4 BEFORE 2.0.4 BEFORE 2.0.4 +// +// NOTE ... nore sure about this htmlspecialchars here ... should users make 'extensive' use of special chars they will lose characters without realising it (as data is trimmed to fit the given fields) +// +// Only way around this at present will be to specialchar data in the relevant source as reqd. inc. +// reverting this to how it was done a few days back. +// +// BEFORE 2.0.4 BEFORE 2.0.4 BEFORE 2.0.4 BEFORE 2.0.4 BEFORE 2.0.4 BEFORE 2.0.4 BEFORE 2.0.4 + while( list($var, $param) = @each($strip_var_list) ) { if ( !empty($HTTP_POST_VARS[$param]) ) @@ -378,7 +387,8 @@ if ( isset($HTTP_POST_VARS['submit']) ) { $avatar_sql = user_avatar_delete($userdata['user_avatar_type'], $userdata['user_avatar']); } - else if ( ( !empty($user_avatar_upload) || !empty($user_avatar_name) ) && $board_config['allow_avatar_upload'] ) + + if ( ( !empty($user_avatar_upload) || !empty($user_avatar_name) ) && $board_config['allow_avatar_upload'] ) { if ( !empty($user_avatar_upload) ) {