Added cache clearing after import
authorAlexander Ebert <ebert@woltlab.com>
Wed, 9 Oct 2013 21:23:18 +0000 (23:23 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Wed, 9 Oct 2013 21:23:18 +0000 (23:23 +0200)
wcfsetup/install/files/acp/js/WCF.ACP.js
wcfsetup/install/files/lib/acp/action/CacheClearAction.class.php

index f4203db83154ded12f09e2a18b6a5ca6f924e643..31b6809399954af4997b7be9f068a09ab9953e95 100644 (file)
@@ -2177,7 +2177,16 @@ WCF.ACP.Import.Manager = Class.extend({
                        
                        var $form = $('<div class="formSubmit" />').appendTo(this._dialog.find('#workerContainer'));
                        $('<button>' + WCF.Language.get('wcf.global.button.next') + '</button>').click($.proxy(function() {
-                               window.location = this._redirectURL;
+                               new WCF.Action.Proxy({
+                                       autoSend: true,
+                                       data: {
+                                               noRedirect: 1
+                                       },
+                                       success: $.proxy(function() {
+                                               window.location = this._redirectURL;
+                                       }, this),
+                                       url: 'index.php/CacheClear/?t=' + SECURITY_TOKEN + SID_ARG_2ND
+                               });
                        }, this)).appendTo($form);
                        
                        this._dialog.wcfDialog('render');
index d211fef3c7e4f8a908a5ce8cbb4ac48ae5bbe350..3140b98d29eb8f05add8eae87e178fbf4fd53f3d 100644 (file)
@@ -39,7 +39,11 @@ class CacheClearAction extends AbstractAction {
                CacheHandler::getInstance()->flushAll();
                
                $this->executed();
-               HeaderUtil::redirect(LinkHandler::getInstance()->getLink('CacheList'));
+               
+               if (!isset($_POST['noRedirect'])) {
+                       HeaderUtil::redirect(LinkHandler::getInstance()->getLink('CacheList'));
+               }
+               
                exit;
        }
 }