Resetting WCF cache prior to Scripts-PIP execution
authorAlexander Ebert <ebert@woltlab.com>
Tue, 6 Nov 2012 00:53:36 +0000 (01:53 +0100)
committerAlexander Ebert <ebert@woltlab.com>
Tue, 6 Nov 2012 00:53:36 +0000 (01:53 +0100)
wcfsetup/install/files/lib/system/package/plugin/ScriptPackageInstallationPlugin.class.php

index ec7a3c97327a7ff615b761cb06c70a7f37d3a04e..b360d6566a836b458d540b3649bccb397b9e3cbc 100644 (file)
@@ -1,5 +1,7 @@
 <?php
 namespace wcf\system\package\plugin;
+use wcf\system\cache\CacheHandler;
+
 use wcf\system\WCF;
 use wcf\util\FileUtil;
 
@@ -32,6 +34,9 @@ class ScriptPackageInstallationPlugin extends AbstractPackageInstallationPlugin
                // get relative path of script
                $path = FileUtil::getRealPath(WCF_DIR.$packageDir);
                
+               // reset WCF cache
+               CacheHandler::getInstance()->clear(WCF_DIR.'cache/', '*.php');
+               
                // run script
                $this->run($path.$this->instruction['value']);