Fixed bug #11643: typoLink() sometimes wrongly drops url if link contains a section...
authorRupert Germann <rupi@gmx.li>
Wed, 21 Oct 2009 10:01:17 +0000 (10:01 +0000)
committerRupert Germann <rupi@gmx.li>
Wed, 21 Oct 2009 10:01:17 +0000 (10:01 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@6211 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
typo3/sysext/cms/tslib/class.tslib_content.php

index 6100ec4..1768a45 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2009-10-21  Rupert Germann  <rupi@gmx.li>
+
+       * Fixed bug #11643: typoLink() sometimes wrongly drops url if link contains a section (thanks to Vladimir Podkovanov)
+
 2009-10-21  Oliver Hader  <oliver@typo3.org>
 
        * Cleanup: Updated ext_emconf.php files in system extensions
index ee883d1..d5ff01a 100644 (file)
@@ -6130,8 +6130,11 @@ class tslib_cObj {
                                                $this->lastTypoLinkTarget = $LD['target'];
                                                $targetPart = $LD['target'] ? ' target="'.$LD['target'].'"' : '';
 
-                                                       // If sectionMark is set, there is no baseURL AND the current page is the page the link is to, check if there are any additional parameters and is not, drop the url.
-                                               if ($sectionMark && !trim($addQueryParams) && $page['uid']==$GLOBALS['TSFE']->id && !$GLOBALS['TSFE']->config['config']['baseURL'])     {
+                                                       // If sectionMark is set, there is no baseURL AND the current page is the page the link is to, check if there are any additional parameters or addQueryString parameters and if not, drop the url.
+                                               if ($sectionMark && !$GLOBALS['TSFE']->config['config']['baseURL'] &&
+                                                               $page['uid'] == $GLOBALS['TSFE']->id && !trim($addQueryParams) &&
+                                                               !($conf['addQueryString'] && $conf['addQueryString.'])) {
+
                                                        list(,$URLparams) = explode('?',$this->lastTypoLinkUrl);
                                                        list($URLparams) = explode('#',$URLparams);
                                                        parse_str ($URLparams.$LD['orig_type'], $URLparamsArray);