From: Alexander Ebert Date: Sun, 30 Dec 2012 01:54:19 +0000 (+0100) Subject: Removed outdated package-based style handling X-Git-Tag: 2.0.0_Beta_1~653 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=08ec9856a0a46f9e95b8c1a03aa16053c9afa187;p=GitHub%2FWoltLab%2FWCF.git Removed outdated package-based style handling Fixes #1031 --- diff --git a/wcfsetup/install/files/lib/system/style/StyleHandler.class.php b/wcfsetup/install/files/lib/system/style/StyleHandler.class.php index bac726d53f..74221c7b54 100644 --- a/wcfsetup/install/files/lib/system/style/StyleHandler.class.php +++ b/wcfsetup/install/files/lib/system/style/StyleHandler.class.php @@ -53,7 +53,7 @@ class StyleHandler extends SingletonFactory { $styles = array(); foreach ($this->cache['styles'] as $styleID => $style) { - if ((!$style->isDisabled && empty($this->cache['packages'][PACKAGE_ID]['disabled'][$styleID])) || WCF::getSession()->getPermission('admin.style.canUseDisabledStyle')) { + if (!$style->isDisabled || WCF::getSession()->getPermission('admin.style.canUseDisabledStyle')) { $styles[$styleID] = $style; } } @@ -84,7 +84,7 @@ class StyleHandler extends SingletonFactory { // check permission if (!$ignorePermissions) { if (isset($this->cache['styles'][$styleID])) { - if (($this->cache['styles'][$styleID]->isDisabled || !empty($this->cache['packages'][PACKAGE_ID]['disabled'][$styleID])) && !WCF::getSession()->getPermission('admin.style.canUseDisabledStyle')) { + if ($this->cache['styles'][$styleID]->isDisabled && !WCF::getSession()->getPermission('admin.style.canUseDisabledStyle')) { $styleID = 0; } } @@ -92,14 +92,8 @@ class StyleHandler extends SingletonFactory { // fallback to default style if (!isset($this->cache['styles'][$styleID])) { - // get package default style - if (!empty($this->cache['packages'][PACKAGE_ID]['default'])) { - $styleID = $this->cache['packages'][PACKAGE_ID]['default']; - } - // get global default style - else { - $styleID = $this->cache['default']; - } + // get default style + $styleID = $this->cache['default']; if (!isset($this->cache['styles'][$styleID])) { throw new SystemException('no default style defined');