[TYPO3-core] RFC: Bug 4476: Allow limitation of config.linkVars

Michael Stucki michael at typo3.org
Tue Jan 23 17:01:15 CET 2007


This is a SVN patch request.

Problem:
Say you have a multilanguage website and use the &L parameter to differ 
between languages. Now you may only have two languages (L=0, L=1) but 
config.linkVars allows just any variable to be copied this way.

The bad thing is, that this page may be stored in the page cache if there is 
no entry yet. And it's even worse to use it in combination with plugins 
(&cHash) and &no_cache=1....

Solution:
Allow to specify which values are allowed for config.linkVars

Documentation changes:

=== cut ===
TSref, section "CONFIG": linkVars, list
... The values are rawurlencoded in PHP...

You can specify a range of valid values by appending a () after each value, 
containing one of these values:
- [a]-[b]: A range of allowed integer values
- int: Only integer values are allowed
- [a]|[b][c]: A list of allowed strings
- /[regex]/: Match against a regular expression (PCRE style)

If this range does not match, the variable won't be used as a linkVar.

Examples:
config.linkVars = L(1-3),key1,key2(ping|pong)

Calling this URL would only keep the "L" and "key1" parameters in links:
http://www.mysite.com/index.php?id=123&L=2&key1=abc&key2=notPing_notPong&key3=ping
=== cut ===

Comments:
Suggestions to describe this in an easier understandable way are very welcome 
(PM to me please).

Branches:
Trunk

- michael
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bug_4476_v2.diff
Type: text/x-diff
Size: 3217 bytes
Desc: not available
Url : http://lists.netfielders.de/pipermail/typo3-team-core/attachments/20070123/c785247e/attachment-0001.bin 


More information about the TYPO3-team-core mailing list