diff options
author | Callum Macrae <callum@lynxphp.com> | 2011-08-24 12:46:33 +0100 |
---|---|---|
committer | Igor Wiedler <igor@wiedler.ch> | 2012-03-31 02:09:15 +0200 |
commit | 11112314f757f4a6c65852817fba0f1a2f4526d2 (patch) | |
tree | 4f80b810b5a24e48747e50d059acf1c219e18d1b /phpBB/includes/acp | |
parent | 7a933bdb5ad4a9bc4877a7d4d516fa0b21d9e4c0 (diff) | |
download | forums-11112314f757f4a6c65852817fba0f1a2f4526d2.tar forums-11112314f757f4a6c65852817fba0f1a2f4526d2.tar.gz forums-11112314f757f4a6c65852817fba0f1a2f4526d2.tar.bz2 forums-11112314f757f4a6c65852817fba0f1a2f4526d2.tar.xz forums-11112314f757f4a6c65852817fba0f1a2f4526d2.zip |
[ticket/10271] AJAXified various deletions in the ACP.
The following places have had deletion AJAXified:
* Smilies and icons
* Word censors
* BBCodes
* Attachment groups
* Groups
* Admin / User / Moderator / Forum roles
* Report / denial reasons
* Module management
* Custom profile fields
PHPBB3-10271
Diffstat (limited to 'phpBB/includes/acp')
-rw-r--r-- | phpBB/includes/acp/acp_bbcodes.php | 14 | ||||
-rw-r--r-- | phpBB/includes/acp/acp_icons.php | 12 | ||||
-rw-r--r-- | phpBB/includes/acp/acp_ranks.php | 14 |
3 files changed, 38 insertions, 2 deletions
diff --git a/phpBB/includes/acp/acp_bbcodes.php b/phpBB/includes/acp/acp_bbcodes.php index a3822a982a..e537d7a8b9 100644 --- a/phpBB/includes/acp/acp_bbcodes.php +++ b/phpBB/includes/acp/acp_bbcodes.php @@ -24,7 +24,7 @@ class acp_bbcodes function main($id, $mode) { - global $db, $user, $auth, $template, $cache; + global $db, $user, $auth, $template, $cache, $request; global $config, $phpbb_root_path, $phpbb_admin_path, $phpEx; $user->add_lang('acp/posting'); @@ -272,6 +272,18 @@ class acp_bbcodes $db->sql_query('DELETE FROM ' . BBCODES_TABLE . " WHERE bbcode_id = $bbcode_id"); $cache->destroy('sql', BBCODES_TABLE); add_log('admin', 'LOG_BBCODE_DELETE', $row['bbcode_tag']); + + if ($request->is_ajax()) + { + $json_response = new phpbb_json_response; + $json_response->send(array( + 'MESSAGE_TITLE' => $user->lang['INFORMATION'], + 'MESSAGE_TEXT' => $user->lang['BBCODE_DELETED'], + 'REFRESH_DATA' => array( + 'time' => 3 + ) + )); + } } else { diff --git a/phpBB/includes/acp/acp_icons.php b/phpBB/includes/acp/acp_icons.php index 49a092f16b..bfe17c5007 100644 --- a/phpBB/includes/acp/acp_icons.php +++ b/phpBB/includes/acp/acp_icons.php @@ -782,6 +782,18 @@ class acp_icons $cache->destroy('_icons'); $cache->destroy('sql', $table); + + if ($request->is_ajax()) + { + $json_response = new phpbb_json_response; + $json_response->send(array( + 'MESSAGE_TITLE' => $user->lang['INFORMATION'], + 'MESSAGE_TEXT' => $notice, + 'REFRESH_DATA' => array( + 'time' => 3 + ) + )); + } } else { diff --git a/phpBB/includes/acp/acp_ranks.php b/phpBB/includes/acp/acp_ranks.php index ec5a76df87..d9ed5b17f1 100644 --- a/phpBB/includes/acp/acp_ranks.php +++ b/phpBB/includes/acp/acp_ranks.php @@ -24,7 +24,7 @@ class acp_ranks function main($id, $mode) { - global $db, $user, $auth, $template, $cache; + global $db, $user, $auth, $template, $cache, $request; global $config, $phpbb_root_path, $phpbb_admin_path, $phpEx; $user->add_lang('acp/posting'); @@ -122,6 +122,18 @@ class acp_ranks $cache->destroy('_ranks'); add_log('admin', 'LOG_RANK_REMOVED', $rank_title); + + if ($request->is_ajax()) + { + $json_response = new phpbb_json_response; + $json_response->send(array( + 'MESSAGE_TITLE' => $user->lang['INFORMATION'], + 'MESSAGE_TEXT' => $user->lang['RANK_REMOVED'], + 'REFRESH_DATA' => array( + 'time' => 3 + ) + )); + } } else { |