aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/adm/style/ajax.js
diff options
context:
space:
mode:
authorMarc Alexander <admin@m-a-styles.de>2013-07-18 22:41:23 +0200
committerMarc Alexander <admin@m-a-styles.de>2013-07-18 22:41:23 +0200
commitf421c082f73b26f5578d14af7cdbfefd013f554a (patch)
treef17e90b84d0681952ab28223c187b6cd8d49f9b3 /phpBB/adm/style/ajax.js
parent29322e85ff31d1a71a07846241dd809972323340 (diff)
downloadforums-f421c082f73b26f5578d14af7cdbfefd013f554a.tar
forums-f421c082f73b26f5578d14af7cdbfefd013f554a.tar.gz
forums-f421c082f73b26f5578d14af7cdbfefd013f554a.tar.bz2
forums-f421c082f73b26f5578d14af7cdbfefd013f554a.tar.xz
forums-f421c082f73b26f5578d14af7cdbfefd013f554a.zip
[ticket/11713] Do not remove module if it couldn't be deleted
Up to now, the module or module category was always removed with jQuery, even if there was an error. With this change, the modules will not be deleted by jQuery if the return JSON array will have SUCCESS set to false. PHPBB3-11713
Diffstat (limited to 'phpBB/adm/style/ajax.js')
-rw-r--r--phpBB/adm/style/ajax.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/phpBB/adm/style/ajax.js b/phpBB/adm/style/ajax.js
index 6f21dfa6ac..efb0639f1b 100644
--- a/phpBB/adm/style/ajax.js
+++ b/phpBB/adm/style/ajax.js
@@ -127,8 +127,10 @@ phpbb.addAjaxCallback('activate_deactivate', function(res) {
* The removes the parent row of the link or form that triggered the callback,
* and is good for stuff like the removal of forums.
*/
-phpbb.addAjaxCallback('row_delete', function() {
- $(this).parents('tr').remove();
+phpbb.addAjaxCallback('row_delete', function(res) {
+ if (res.SUCCESS !== false) {
+ $(this).parents('tr').remove();
+ }
});