From: Tim Düsterhus Date: Thu, 12 May 2022 10:29:34 +0000 (+0200) Subject: Remove the `$_REQUEST['styleID']` handling X-Git-Tag: 6.0.0_Alpha_1~1321^2^2 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=bb2430b495a4bfe7e8f205b97749f49ce4f59229;p=GitHub%2FWoltLab%2FWCF.git Remove the `$_REQUEST['styleID']` handling Resolves #4533 --- diff --git a/wcfsetup/install/files/lib/system/WCF.class.php b/wcfsetup/install/files/lib/system/WCF.class.php index f8da53a2df..1189866f3c 100644 --- a/wcfsetup/install/files/lib/system/WCF.class.php +++ b/wcfsetup/install/files/lib/system/WCF.class.php @@ -9,7 +9,6 @@ use wcf\data\package\PackageCache; use wcf\data\package\PackageEditor; use wcf\data\page\Page; use wcf\data\page\PageCache; -use wcf\data\style\StyleAction; use wcf\page\CmsPage; use wcf\system\application\ApplicationHandler; use wcf\system\application\IApplication; @@ -24,9 +23,7 @@ use wcf\system\exception\ErrorException; use wcf\system\exception\IPrintableException; use wcf\system\exception\NamedUserException; use wcf\system\exception\ParentClassException; -use wcf\system\exception\PermissionDeniedException; use wcf\system\exception\SystemException; -use wcf\system\exception\UserInputException; use wcf\system\language\LanguageFactory; use wcf\system\package\PackageInstallationDispatcher; use wcf\system\registry\RegistryHandler; @@ -545,27 +542,10 @@ class WCF */ protected function initStyle() { - $styleID = 0; - - /** @deprecated The 'styleID' parameter is deprecated. */ - if (isset($_REQUEST['styleID'])) { - $styleID = \intval($_REQUEST['styleID']); - - try { - $action = new StyleAction([$styleID], 'changeStyle'); - $action->validateAction(); - $action->executeAction(); - } catch (PermissionDeniedException | UserInputException $e) { - $styleID = 0; - } - } - - if ($styleID === 0) { - if (self::getSession()->getUser()->userID) { - $styleID = self::getSession()->getUser()->styleID ?: 0; - } else { - $styleID = self::getSession()->getVar('styleID') ?: 0; - } + if (self::getSession()->getUser()->userID) { + $styleID = self::getSession()->getUser()->styleID ?: 0; + } else { + $styleID = self::getSession()->getVar('styleID') ?: 0; } $styleHandler = StyleHandler::getInstance();