From: Alexander Ebert Date: Tue, 12 Apr 2016 09:37:03 +0000 (+0200) Subject: `appendSession` is now deprecated X-Git-Tag: 3.0.0_Beta_1~1925 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=d8954071b044219aba4f3ac71f4942ca6a97f8c0;p=GitHub%2FWoltLab%2FWCF.git `appendSession` is now deprecated --- diff --git a/wcfsetup/install/files/lib/system/request/LinkHandler.class.php b/wcfsetup/install/files/lib/system/request/LinkHandler.class.php index 2e9aa4aef2..0f767035ed 100644 --- a/wcfsetup/install/files/lib/system/request/LinkHandler.class.php +++ b/wcfsetup/install/files/lib/system/request/LinkHandler.class.php @@ -68,12 +68,16 @@ class LinkHandler extends SingletonFactory { $anchor = ''; $isACP = $originIsACP = RequestHandler::getInstance()->isACPRequest(); $isRaw = false; - $appendSession = $encodeTitle = true; + $encodeTitle = true; + + /** + * @deprecated 2.2 - no longer required + */ + $appendSession = false; // enforce a certain level of sanitation and protection for links embedded in emails if (isset($parameters['isEmail']) && (bool)$parameters['isEmail']) { $parameters['forceFrontend'] = true; - $parameters['appendSession'] = false; unset($parameters['isEmail']); } @@ -85,22 +89,15 @@ class LinkHandler extends SingletonFactory { unset($parameters['isRaw']); } if (isset($parameters['appendSession'])) { - $appendSession = $parameters['appendSession']; unset($parameters['appendSession']); } if (isset($parameters['isACP'])) { $isACP = (bool) $parameters['isACP']; unset($parameters['isACP']); - - // drop session id if link leads to ACP from frontend or vice versa - if ($originIsACP != $isACP) { - $appendSession = false; - } } if (isset($parameters['forceFrontend'])) { if ($parameters['forceFrontend'] && $isACP) { $isACP = false; - $appendSession = false; } unset($parameters['forceFrontend']); } @@ -173,11 +170,6 @@ class LinkHandler extends SingletonFactory { $url = $routeURL . $url; - // append session id - if ($appendSession) { - $url .= (strpos($url, '?') === false) ? SID_ARG_1ST : SID_ARG_2ND_NOT_ENCODED; - } - // handle applications if (!PACKAGE_ID) { $url = RouteHandler::getHost() . RouteHandler::getPath(['acp']) . ($isACP ? 'acp/' : '') . $url;