diff options
| author | Meik Sievertsen <acydburn@phpbb.com> | 2006-12-27 17:43:55 +0000 |
|---|---|---|
| committer | Meik Sievertsen <acydburn@phpbb.com> | 2006-12-27 17:43:55 +0000 |
| commit | 945afbc5fa427f6e6fa15f3e2f5c67969121b01e (patch) | |
| tree | 1742cf822c3339eec48d8d54e6ce08c51316b59b /phpBB/includes/acp/acp_ranks.php | |
| parent | b9da985180730252133699242ef639f91da2880e (diff) | |
| download | forums-945afbc5fa427f6e6fa15f3e2f5c67969121b01e.tar forums-945afbc5fa427f6e6fa15f3e2f5c67969121b01e.tar.gz forums-945afbc5fa427f6e6fa15f3e2f5c67969121b01e.tar.bz2 forums-945afbc5fa427f6e6fa15f3e2f5c67969121b01e.tar.xz forums-945afbc5fa427f6e6fa15f3e2f5c67969121b01e.zip | |
Unused Code inside function update_forum_data [Bug #6606]
Copy permissions protection for groups [Bug #6594]
HTML issues in ACP [Bug #6580, #6578]
Always send the correct encoding [related to bug #6576]
Mass email fixes for first loop iteration [Bug #6570]
Extension groups to be allowed in PM's and/or Posts [Bug #6558]
Extension allowance checking clarified (no longer using forum id 0 for private messaging)
Using request_var() array method for some variables [Bug #6556]
Added confirmation for deletion of ranks/smilies/icons/word censores [Bug #6548, #6530, #6512, #6466]
Only show postable forums in dropdown list for moving posts on forum deletion as well as correct re-indexing [Bug #6510, #6476, #6384]
Jabber password being password field in jabber settings screen [Bug #6478]
user activity language variable if viewing not own profile [Bug #6432]
Show moderator group/user-name colour [Bug #6402]
Log rank creation/updating/removing [Bug #6398]
Update check permission changed from a_ to a_board [Bug #6392]
git-svn-id: file:///svn/phpbb/trunk@6816 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/acp/acp_ranks.php')
| -rw-r--r-- | phpBB/includes/acp/acp_ranks.php | 28 |
1 files changed, 24 insertions, 4 deletions
diff --git a/phpBB/includes/acp/acp_ranks.php b/phpBB/includes/acp/acp_ranks.php index db96b173e8..a52ff07607 100644 --- a/phpBB/includes/acp/acp_ranks.php +++ b/phpBB/includes/acp/acp_ranks.php @@ -62,11 +62,15 @@ class acp_ranks { $sql = 'UPDATE ' . RANKS_TABLE . ' SET ' . $db->sql_build_array('UPDATE', $sql_ary) . " WHERE rank_id = $rank_id"; $message = $user->lang['RANK_UPDATED']; + + add_log('admin', 'LOG_RANK_UPDATED', $rank_title); } else { $sql = 'INSERT INTO ' . RANKS_TABLE . ' ' . $db->sql_build_array('INSERT', $sql_ary); $message = $user->lang['RANK_ADDED']; + + add_log('admin', 'LOG_RANK_ADDED', $rank_title); } $db->sql_query($sql); @@ -78,9 +82,20 @@ class acp_ranks case 'delete': - // Ok, they want to delete their rank - if ($rank_id) + if (!$rank_id) { + trigger_error($user->lang['MUST_SELECT_RANK'] . adm_back_link($this->u_action), E_USER_WARNING); + } + + if (confirm_box(true)) + { + $sql = 'SELECT rank_title + FROM ' . RANKS_TABLE . ' + WHERE rank_id = ' . $rank_id; + $result = $db->sql_query($sql); + $rank_title = (string) $db->sql_fetchfield('rank_title'); + $db->sql_freeresult($result); + $sql = 'DELETE FROM ' . RANKS_TABLE . " WHERE rank_id = $rank_id"; $db->sql_query($sql); @@ -92,11 +107,16 @@ class acp_ranks $cache->destroy('ranks'); - trigger_error($user->lang['RANK_REMOVED'] . adm_back_link($this->u_action)); + add_log('admin', 'LOG_RANK_REMOVED', $rank_title); } else { - trigger_error($user->lang['MUST_SELECT_RANK'] . adm_back_link($this->u_action), E_USER_WARNING); + confirm_box(false, $user->lang['CONFIRM_OPERATION'], build_hidden_fields(array( + 'i' => $id, + 'mode' => $mode, + 'rank_id' => $rank_id, + 'action' => 'delete', + ))); } break; |
