[TYPO3-core] RFC: #10040: define Default GET-vars

Martin Kutschker masi-no at spam-typo3.org
Thu Jan 1 15:56:56 CET 2009


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);
 }
}

Masi


More information about the TYPO3-team-core mailing list