use wcf\system\exception\SystemException;
use wcf\system\language\LanguageFactory;
use wcf\system\request\LinkHandler;
+use wcf\system\style\StyleHandler;
use wcf\system\WCF;
use wcf\util\FileUtil;
use wcf\util\HeaderUtil;
public function execute() {
parent::execute();
+ // reset stylesheets
+ StyleHandler::resetStylesheets();
+
// delete language cache and compiled templates as well
LanguageFactory::getInstance()->deleteLanguageCache();
$this->readCacheFiles('language', FileUtil::unifyDirSeperator(WCF_DIR.'language'));
$this->readCacheFiles('template', FileUtil::unifyDirSeperator(WCF_DIR.'templates/compiled'), new Regex('\.meta\.php$'));
$this->readCacheFiles('template', FileUtil::unifyDirSeperator(WCF_DIR.'acp/templates/compiled'), new Regex('\.meta\.php$'));
+ $this->readCacheFiles('style', FileUtil::unifyDirSeperator(WCF_DIR.'style'), null, 'css');
+ $this->readCacheFiles('style', FileUtil::unifyDirSeperator(WCF_DIR.'acp/style'), new Regex('^WCFSetup.css$'), 'css');
}
/**
* @param strign $cacheDir
* @param wcf\system\Regex $ignore
*/
- protected function readCacheFiles($cacheType, $cacheDir, Regex $ignore = null) {
+ protected function readCacheFiles($cacheType, $cacheDir, Regex $ignore = null, $extension = 'php') {
if (!isset($this->cacheData[$cacheType])) {
$this->cacheData[$cacheType] = array();
}
return;
}
- $files = $directoryUtil->getFileObjects(SORT_ASC, new Regex('\.php$'));
+ $files = $directoryUtil->getFileObjects(SORT_ASC, new Regex('\.'.$extension.'$'));
// get additional file information
$data = array();
<item name="wcf.acp.cache.source.type.NoCacheSource"><![CDATA[keine (Caching deaktiviert)]]></item>
<item name="wcf.acp.cache.type.data"><![CDATA[Daten]]></item>
<item name="wcf.acp.cache.type.language"><![CDATA[Sprachen]]></item>
+ <item name="wcf.acp.cache.type.style"><![CDATA[Stile]]></item>
<item name="wcf.acp.cache.type.template"><![CDATA[Templates]]></item>
</category>