[Typo3-dev] Bug in t3lib_tstemplate ?

Kasper Skårhøj kasper2005 at typo3.com
Tue Mar 22 17:17:23 CET 2005


It is not a bug, at least it is "accepted" by me.

First of all it was not possible to avoid the dublet paramter.
Secondly, it turns out that the dublet is no problem, just in excess. It
works...
Thirdly, since it works and is no harm to (other than your eyes) I
decided NOT to spend valuable processing time in parsing the parameters
to clean it up.

if you use such as "realurl" extension the problem is totally gone. And
using the same hook as realurl you can write your own extension to clean
it.

I don't like doing this processing because some pages contains 100+
rendered links and link-rendering is ALREADY some of what slows page
rendering down in TYPO3 - so we don't want more overhead there. But
making it a TypoScript option to uniquify the parameter list would not
hurt...

- kasper


On Mon, 2005-03-14 at 14:04, Stefan Geith wrote:
> 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
> _______________________________________________
> Typo3-dev mailing list
> Typo3-dev at lists.netfielders.de
> http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-dev
-- 
- kasper

*******************
Happy new year! - My email address is now: 

		kasper2005 at typo3.com 







More information about the TYPO3-dev mailing list