From 127ee67e2b1f705226a5b182368cf5cb46da951e Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Wed, 9 Oct 2013 23:23:18 +0200 Subject: [PATCH] Added cache clearing after import --- wcfsetup/install/files/acp/js/WCF.ACP.js | 11 ++++++++++- .../files/lib/acp/action/CacheClearAction.class.php | 6 +++++- 2 files changed, 15 insertions(+), 2 deletions(-) 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; } } -- 2.20.1