Added work-around for cache reset for scripts pip
authorAlexander Ebert <ebert@woltlab.com>
Sun, 20 Nov 2016 14:36:31 +0000 (15:36 +0100)
committerAlexander Ebert <ebert@woltlab.com>
Sun, 20 Nov 2016 15:23:11 +0000 (16:23 +0100)
com.woltlab.wcf/package.xml
wcfsetup/install/files/lib/system/package/plugin/ScriptPackageInstallationPlugin.class.php

index 44723feca862723482ec72576c1c4b8b2358647f..04b5f4254b2e4e7c259cdb2c38e753ab56726c4c 100644 (file)
@@ -57,7 +57,7 @@
                <instruction type="sql">update_part1.sql</instruction>
                
                <instruction type="file" run="standalone">files.tar</instruction>
-               <instruction type="script" run="standalone">acp/update_com.woltlab.wcf_3.0_columnLength.php</instruction>
+               <instruction type="script" run="standalone" flushCache="false">acp/update_com.woltlab.wcf_3.0_columnLength.php</instruction>
                <instruction type="sql" run="standalone">update.sql</instruction>
                
                <instruction type="acpTemplate">acptemplates.tar</instruction>
index 82ec9e7a62e4d18552788e503a52288b6f285d59..1a5424712277ebffa5601fa83a0adaa1bbb5fe2e 100644 (file)
@@ -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']);