From: Alexander Ebert Date: Thu, 20 Sep 2012 15:12:33 +0000 (+0200) Subject: getStyleHandler() is now embedded within WCF class X-Git-Tag: 2.0.0_Beta_1~929 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=ae054dfc8595c77769db728338d8bd9084ee610b;p=GitHub%2FWoltLab%2FWCF.git getStyleHandler() is now embedded within WCF class --- diff --git a/com.woltlab.wcf/coreObject.xml b/com.woltlab.wcf/coreObject.xml index e68ca487e1..6f75bc6d48 100644 --- a/com.woltlab.wcf/coreObject.xml +++ b/com.woltlab.wcf/coreObject.xml @@ -16,8 +16,5 @@ - - - diff --git a/wcfsetup/install/files/acp/templates/header.tpl b/wcfsetup/install/files/acp/templates/header.tpl index adf055a9e2..9fe7b8e231 100644 --- a/wcfsetup/install/files/acp/templates/header.tpl +++ b/wcfsetup/install/files/acp/templates/header.tpl @@ -29,7 +29,7 @@ {* work-around for unknown core-object during WCFSetup *} - {if PACKAGE_ID}{@$__wcf->getStyleHandler()->getStylesheet(true)}{/if} + {@$__wcf->getStyleHandler()->getStylesheet()} {* {if $specialStyles|isset} diff --git a/wcfsetup/install/files/lib/system/WCF.class.php b/wcfsetup/install/files/lib/system/WCF.class.php index 26ee5ee92f..f79c0d3aab 100644 --- a/wcfsetup/install/files/lib/system/WCF.class.php +++ b/wcfsetup/install/files/lib/system/WCF.class.php @@ -9,6 +9,7 @@ use wcf\system\language\LanguageFactory; use wcf\system\package\PackageInstallationDispatcher; use wcf\system\session\SessionFactory; use wcf\system\session\SessionHandler; +use wcf\system\style\StyleHandler; use wcf\system\template\TemplateEngine; use wcf\system\user\storage\UserStorageHandler; use wcf\system\exception; @@ -639,6 +640,15 @@ class WCF { return $baseHref . 'index.php' . $path . '#' . $fragment; } + /** + * Returns style handler. + * + * @return wcf\system\style\StyleHandler + */ + public function getStyleHandler() { + return StyleHandler::getInstance(); + } + /** * Initialises the cronjobs. */ diff --git a/wcfsetup/install/files/lib/system/style/StyleHandler.class.php b/wcfsetup/install/files/lib/system/style/StyleHandler.class.php index 350b3cdbb9..7b829e91bb 100644 --- a/wcfsetup/install/files/lib/system/style/StyleHandler.class.php +++ b/wcfsetup/install/files/lib/system/style/StyleHandler.class.php @@ -4,6 +4,7 @@ use wcf\data\style\ActiveStyle; use wcf\system\application\ApplicationHandler; use wcf\system\cache\CacheHandler; use wcf\system\exception\SystemException; +use wcf\system\request\RequestHandler; use wcf\system\SingletonFactory; use wcf\system\WCF; @@ -119,11 +120,10 @@ class StyleHandler extends SingletonFactory { * * @todo Add RTL support * - * @param boolean $isACP * @return string */ - public function getStylesheet($isACP = false) { - if ($isACP) { + public function getStylesheet() { + if (RequestHandler::getInstance()->isACPRequest()) { // ACP $filename = 'acp/style/style.css'; if (!file_exists(WCF_DIR.$filename)) {