[TYPO3-core] RFC #10432: Page TS option to disable available languages

Xavier Perseguers typo3 at perseguers.ch
Fri Feb 13 15:44:49 CET 2009


Hi Steffen,

> +1 by reading and testing, though i have some remarks.

Thanks.

> I know you copied method from above the code, but imho there shoud be 
> done additional checks
> 
> * check isset of config array
> * check isset of $langSelItems before unset
> * don't allow unset of index 0
> 
> why they use array_flip above? I don't see a need for.

The code from Kasper (or someone else I did not check) had a loop with

foreach ($languages as $key => $value)

and used $key as an index for unsetting items in $langSelItems. As the 
useful information was in the "value" of array $languages and not in the 
key itself, there was a need to swap keys and values in the $languages 
array.

This is weird but I wanted my patch to use the very same notation as the 
rest of the code.

 > Attached is the changed patch from me.

Thanks for this.

-- 
Xavier Perseguers
http://xavier.perseguers.ch/en

One contribution a day keeps the fork away


More information about the TYPO3-team-core mailing list