// build redirect location
$location = $application->getPageURL() . 'acp/index.php/PackageList/' . SID_ARG_1ST;
+ WCF::resetZendOpcache();
+
// show success
$this->data = array(
'currentAction' => $this->getCurrentAction(null),
return;
}
+ WCF::resetZendOpcache();
+
// continue with next node
$this->data = array(
'currentAction' => $this->getCurrentAction($queueID),
*/
protected static $tplObj = null;
+ /**
+ * true if Zend Opcache is loaded and enabled
+ * @var boolean
+ */
+ protected static $zendOpcacheEnabled = null;
+
/**
* Calls all init functions of the WCF class.
*/
return $baseHref . $path;
}
+ /**
+ * Resets Zend Opcache cache if installed and enabled.
+ *
+ * @param string $script
+ */
+ public static function resetZendOpcache($script = '') {
+ if (self::$zendOpcacheEnabled === null) {
+ if (extension_loaded('Zend Opcache') && @ini_get('opcache.enable')) {
+ self::$zendOpcacheEnabled = true;
+ }
+
+ self::$zendOpcacheEnabled = false;
+ }
+
+ if (self::$zendOpcacheEnabled) {
+ if (empty($script)) {
+ opcache_reset();
+ }
+ else {
+ opcache_invalidate($script, true);
+ }
+ }
+ }
+
/**
* Returns style handler.
*
use wcf\system\io\File;
use wcf\system\Callback;
use wcf\system\Regex;
+use wcf\system\WCF;
use wcf\util\DirectoryUtil;
use wcf\util\FileUtil;
else {
$this->removeFiles('cache.'.$cacheName.'.php');
}
+
+ WCF::resetZendOpcache();
}
/**
*/
public function flushAll() {
$this->getDirectoryUtil()->removePattern(new Regex('.*\.php$'));
+
+ WCF::resetZendOpcache();
}
/**
// unset current DirectoryUtil object to make sure new cache file
// can be deleted in the same request
$this->directoryUtil = null;
+
+ WCF::resetZendOpcache($this->getFilename($cacheName));
}
/**