From 876d2d835297877568ac1c28feeb5c3c7ba5dff1 Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Wed, 7 Nov 2012 18:48:12 +0100 Subject: [PATCH] Added 'appendSession' parameter to LinkHandler Whenever you're providing a permanent-link to an object, set appendSession to "false" as it suppresses the session id. --- .../files/lib/system/request/LinkHandler.class.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/wcfsetup/install/files/lib/system/request/LinkHandler.class.php b/wcfsetup/install/files/lib/system/request/LinkHandler.class.php index fa3b8ed0f4..5fd5d7258f 100644 --- a/wcfsetup/install/files/lib/system/request/LinkHandler.class.php +++ b/wcfsetup/install/files/lib/system/request/LinkHandler.class.php @@ -27,6 +27,7 @@ class LinkHandler extends SingletonFactory { $abbreviation = 'wcf'; $anchor = ''; $isRaw = false; + $appendSession = true; if (isset($parameters['application'])) { $abbreviation = $parameters['application']; unset($parameters['application']); @@ -35,6 +36,10 @@ class LinkHandler extends SingletonFactory { $isRaw = $parameters['isRaw']; unset($parameters['isRaw']); } + if (isset($parameters['appendSession'])) { + $appendSession = $parameters['appendSession']; + unset($parameters['appendSession']); + } // remove anchor before parsing if (($pos = strpos($url, '#')) !== false) { @@ -72,7 +77,9 @@ class LinkHandler extends SingletonFactory { } // append session id - $url .= (strpos($url, '?') === false) ? SID_ARG_1ST : SID_ARG_2ND_NOT_ENCODED; + if ($appendSession) { + $url .= (strpos($url, '?') === false) ? SID_ARG_1ST : SID_ARG_2ND_NOT_ENCODED; + } // handle application groups $applicationGroup = ApplicationHandler::getInstance()->getActiveGroup(); -- 2.20.1