[BUGFIX] Shortcut page does not keep 'type' parameter
authorXavier Perseguers <xavier@typo3.org>
Mon, 21 Nov 2011 12:32:29 +0000 (13:32 +0100)
committerTolleiv Nietsch <info@tolleiv.de>
Sun, 15 Jan 2012 16:20:41 +0000 (17:20 +0100)
When a shortcut page is accessed with ?type=123 in the URL, the
redirect is calculated without this parameter.

Change-Id: I6638d34fcbc1a3862f65783e4ad3a226de1dd3e0
Fixes: #31333
Releases: 4.7, 4.6
Reviewed-on: http://review.typo3.org/6775
Reviewed-by: Oliver Hader
Tested-by: Oliver Hader
Reviewed-by: Stefan Neufeind
Reviewed-by: Tolleiv Nietsch
Tested-by: Tolleiv Nietsch
typo3/sysext/cms/tslib/class.tslib_fe.php

index 6770a3c..a1ef46e 100644 (file)
                        }
 
                                // instantiate tslib_content to generate the correct target URL
+                       /** @var $cObj tslib_cObj */
                        $cObj = t3lib_div::makeInstance('tslib_cObj');
-                       $redirectUrl = $cObj->typoLink_URL(array('parameter' => $this->page['uid']));
+                       $parameter = $this->page['uid'];
+                       $type = t3lib_div::_GET('type');
+                       if ($type) {
+                               $parameter .= ',' . $type;
+                       }
+                       $redirectUrl = $cObj->typoLink_URL(array('parameter' => $parameter));
 
                                // HTTP Status code header - dependent on shortcut type
                        $redirectStatus = t3lib_utility_Http::HTTP_STATUS_301;