From: Alexander Ebert Date: Wed, 9 Oct 2013 21:23:18 +0000 (+0200) Subject: Added cache clearing after import X-Git-Tag: 2.0.0_Beta_11~44^2 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=127ee67e2b1f705226a5b182368cf5cb46da951e;p=GitHub%2FWoltLab%2FWCF.git Added cache clearing after import --- diff --git a/wcfsetup/install/files/acp/js/WCF.ACP.js b/wcfsetup/install/files/acp/js/WCF.ACP.js index f4203db831..31b6809399 100644 --- a/wcfsetup/install/files/acp/js/WCF.ACP.js +++ b/wcfsetup/install/files/acp/js/WCF.ACP.js @@ -2177,7 +2177,16 @@ WCF.ACP.Import.Manager = Class.extend({ var $form = $('
').appendTo(this._dialog.find('#workerContainer')); $('').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'); diff --git a/wcfsetup/install/files/lib/acp/action/CacheClearAction.class.php b/wcfsetup/install/files/lib/acp/action/CacheClearAction.class.php index d211fef3c7..3140b98d29 100644 --- a/wcfsetup/install/files/lib/acp/action/CacheClearAction.class.php +++ b/wcfsetup/install/files/lib/acp/action/CacheClearAction.class.php @@ -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; } }