From 1a3abfa8f274718ae41da45d09d71c10bd938dd0 Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Sun, 20 Nov 2016 15:36:31 +0100 Subject: [PATCH] Added work-around for cache reset for scripts pip --- com.woltlab.wcf/package.xml | 2 +- .../plugin/ScriptPackageInstallationPlugin.class.php | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/com.woltlab.wcf/package.xml b/com.woltlab.wcf/package.xml index 44723feca8..04b5f4254b 100644 --- a/com.woltlab.wcf/package.xml +++ b/com.woltlab.wcf/package.xml @@ -57,7 +57,7 @@ update_part1.sql files.tar - acp/update_com.woltlab.wcf_3.0_columnLength.php + acp/update_com.woltlab.wcf_3.0_columnLength.php update.sql acptemplates.tar diff --git a/wcfsetup/install/files/lib/system/package/plugin/ScriptPackageInstallationPlugin.class.php b/wcfsetup/install/files/lib/system/package/plugin/ScriptPackageInstallationPlugin.class.php index 82ec9e7a62..1a54247122 100644 --- a/wcfsetup/install/files/lib/system/package/plugin/ScriptPackageInstallationPlugin.class.php +++ b/wcfsetup/install/files/lib/system/package/plugin/ScriptPackageInstallationPlugin.class.php @@ -38,8 +38,13 @@ class ScriptPackageInstallationPlugin extends AbstractPackageInstallationPlugin $path = constant($dirConstant); } + $flushCache = true; + if (isset($this->instruction['attributes']['flushCache']) && $this->instruction['attributes']['flushCache'] === 'false') { + $flushCache = false; + } + // reset WCF cache - CacheHandler::getInstance()->flushAll(); + if ($flushCache) CacheHandler::getInstance()->flushAll(); // run script $this->run($path.$this->instruction['value']); -- 2.20.1