[TYPO3-core] RFC: #16116: Configuration module is hard to find the array key because it's not sorted

Susanne Moog typo3 at susannemoog.de
Fri Nov 5 18:15:28 CET 2010


On 24.10.2010 16:34, Steffen Gebert wrote:
>> Type: Bugfix / Feature
>>
>> BT Reference: http://bugs.typo3.org/view.php?id=16116
>>
>> Branches: trunk
>>
>> When you explore array in configuration module it's hard to find the
>> array key you are looking for because display order is the init order.
>>
>> Solution:
>> sort the arrays recursive.
>> I introduced a new array function in t3lib_div called ksortRecursive, as
>> this might be useful in many other places.
> 
> Hi Steffen,
> 
> +1 by reading and testing
> 
> I've attached a version 2, which improves the PHPDoc and allows to
> pass-thru the second parameter $sort_order to ksort().
> 
> Unfortunately PHP has no native sort function, which sorts in the IMHO
> more "human" order, but always puts all uppercase words first, then all
> lowercase words.

a real sort function isn't there but something pretty similar. Attached
v3 which uses uksort and strcasecmp to get a natural sort order.

Cheers,

Susanne


-- 
What's worth the price is always worth the fight
Every second counts 'cause there's no second try

TYPO3 Core Team Member
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 16116_v3.diff
URL: <http://lists.typo3.org/pipermail/typo3-team-core/attachments/20101105/23269dc7/attachment.asc>


More information about the TYPO3-team-core mailing list