<?php
namespace wcf\system\package;
+use wcf\system\style\StyleHandler;
+
use wcf\data\application\Application;
use wcf\data\application\ApplicationEditor;
use wcf\data\language\category\LanguageCategory;
// reset language cache
LanguageFactory::getInstance()->clearCache();
LanguageFactory::getInstance()->deleteLanguageCache();
+
+ // reset stylesheets
+ StyleHandler::resetStylesheets();
}
return $step;
LanguageFactory::getInstance()->clearCache();
LanguageFactory::getInstance()->deleteLanguageCache();
+ // reset stylesheets
+ StyleHandler::resetStylesheets();
+
// rebuild application paths
ApplicationHandler::rebuild();
}
@unlink($stylesheet);
}
}
+
+ /**
+ * Resets all stylesheets.
+ */
+ public static function resetStylesheets() {
+ // frontend stylesheets
+ $stylesheets = glob(WCF_DIR.'style/style-*.css');
+ foreach ($stylesheets as $stylesheet) {
+ @unlink($stylesheet);
+ }
+
+ // ACP stylesheets
+ $stylesheets = glob(WCF_DIR.'acp/style/style*.css');
+ foreach ($stylesheets as $stylesheet) {
+ @unlink($stylesheet);
+ }
+ }
}