[Typo3-dev] Bug in t3lib_tstemplate ?

Stefan Geith typo3dev at geithware.de
Mon Mar 14 14:04:38 CET 2005


Hi,

When using
    HMENU.special = language
with
   linkVars = L
then the links in the language-menu contain multiple '&l='-Paramters
(see bug_id=0000490).


The problem seems to be in function linkData in t3lib_tstemplate:
     1325    // linkVars
     1326    $LD['linkVars'] = $GLOBALS['TSFE']->linkVars.$addParams;

Maybe this should be replaced with something like this:
     // linkVars
     $lV = Array();
     $tmp = explode ('&',$GLOBALS['TSFE']->linkVars);
     while(list($k,$e)=each($tmp)) if ($e)    {
         list($k,$v) = explode('=',$e);
         $lV[$k] = $v;
     }
     $tmp = explode ('&',$addParams);
     while(list($k,$e)=each($tmp)) if ($e)    {
         list($k,$v) = explode('=',$e);
         $lV[$k] = $v;
     }
     $LD['linkVars'] = t3lib_div::implodeArrayForUrl('',$lV);

-

Stefan




More information about the TYPO3-dev mailing list