`appendSession` is now deprecated
authorAlexander Ebert <ebert@woltlab.com>
Tue, 12 Apr 2016 09:37:03 +0000 (11:37 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Tue, 12 Apr 2016 09:37:03 +0000 (11:37 +0200)
wcfsetup/install/files/lib/system/request/LinkHandler.class.php

index 2e9aa4aef2f33e3ebc0d6020195fdae80069ea33..0f767035ed34c961ee6b7ab25d2731bd6b037d8e 100644 (file)
@@ -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;