[TYPO3-core] RFC: #10040: define Default GET-vars
Marcus Krause
marcus#exp2009 at t3sec.info
Sun Jan 4 16:18:02 CET 2009
Martin Kutschker schrieb am 01.01.2009 15:56 Uhr:
> Steffen Kamper schrieb:
>> Hi,
>>
>> This is SVN patch request.
>> Type: Feature
>>
>> Bugtracker references:
>> http://bugs.typo3.org/view.php?id=10040
>>
>> Branches: trunk
>>
>> Problem:
>>
>> There is no way to set default values for GET-vars as you know from
>> extensions where you can set _DEFAULT_PI_VARS
>
> For plugins the name is chosen to avoid conflicts with user defined
> names for "config" we can use better ones, eg "defaultGetVars".
>
> Maybe it makes sense to write back the GET variables only when they are
> modified:
>
> if (is_array($this->config['config']['_DEFAULT_GET_VARS.'])) {
> $getVars = t3lib_div::_GET();
> $modified = false;
> foreach ($this->config['config']['_DEFAULT_GET_VARS.'] as
> $key => $value) {
> $getVars[$key] = $value;
> $modified = true;
> }
> }
> if ($modified) {
> t3lib_div::_GETset($getVars);
> }
> }
I guess this won't work for multidimensional arrays.
Marcus.
More information about the TYPO3-team-core
mailing list