Feature #17238

Test config.linkVars - enable (basic) check for arrays

Added by Ralf Hettinger over 12 years ago. Updated about 2 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Frontend
Target version:
-
Start date:
2007-04-24
Due date:
% Done:

0%

PHP Version:
5.5
Tags:
Complexity:
Sprint Focus:

Description

The lately (4.1?) introduced possibily for testing config.linkVars is indeed useful but unfortunately doesn't allow any checking for GET var arrays (only array is respected to allow a whole array to pass) .

This is especially unfortunate because almost any frontend plugin will submit it's GET vars as an array - like &fe_plugin[fe_plugin_getvar]=value.

So I'd suggest to at least enhance linkVars to allow checking if a certain fe_plugin_getvar is allowed, which could be achieved with the attached patch.

With the patch, the TS
config.linkVar = fe_plugin(fe_plugin_getvar1 | fe_plugin_getvar1)
would result in the following:

1) if fe_plugin is a simple non-array GET var, the | will behave as an OR for allowed values (this is indeed the current behaviour without patching; I'm just mentioning it for completeness)
2) if fe_plugin is a GET var array, the | will behave as an OR for allowed array elements fe_plugin_var (i.e. a FE plugin's GET vars) but not it's values (for checking those, more work has still to be done).

Please notice: I found http://bugs.typo3.org/view.php?id=5010 to be stable under several test situations and very useful (indeed essential for avoiding serious performance issues with several linkVars in place). Since the same lines of code are affected, the attached patch includes 0005010_3.patch of #17002
(issue imported from #M5489)

5489.patch View (3.22 KB) Administrator Admin, 2007-04-24 23:52


Related issues

Related to TYPO3 Core - Bug #17002: cHash is not recreated on disposal in config.linkVars Closed 2007-02-17
Related to TYPO3 Core - Feature #22439: Allow nested GET-params in config.linkVars Closed 2010-04-13

History

#1 Updated by Simon Schaufelberger about 8 years ago

  • Target version deleted (0)

i find this extremely helpful if you want to add some parameters of an extension to a normal TMENU for example.

i am trying to use:

config.linkVars = tx_community|user

in this case i want to add the userid to any link in my main navigation to stay on his profile.

the only thing that works is:

config.linkVars = tx_community

but then i get all links added with this extension which is not good at all.

#2 Updated by Mathias Schreiber almost 5 years ago

  • Tracker changed from Bug to Feature
  • Description updated (diff)
  • Category changed from Communication to Frontend
  • Status changed from New to Accepted
  • PHP Version changed from 4.3 to 5.5

#3 Updated by Markus Klein about 2 years ago

  • Status changed from Accepted to Closed

This should be resolved with #22439.

Also available in: Atom PDF