[FEATURE] Sort plugin names in BE form alphabetically
authorDmitry Dulepov <dmitry@typo3.org>
Thu, 3 Mar 2011 13:38:03 +0000 (14:38 +0100)
committerAndreas Wolf <andreas.wolf@ikt-werk.de>
Mon, 7 Mar 2011 14:09:52 +0000 (15:09 +0100)
Change-Id: Ic470c0418008b601a14a1cc1bccec13226cb2ae0
Resolves: #M17856
Reviewed-on: http://review.typo3.org/1010
Reviewed-by: Andreas Wolf <andreas.wolf@ikt-werk.de>
Tested-by: Andreas Wolf <andreas.wolf@ikt-werk.de>
typo3/sysext/cms/tbl_tt_content.php

index ff0c5ff..35067df 100755 (executable)
 
 
 
+if (!function_exists('user_sortPluginList')) {
+       function user_sortPluginList(array &$parameters) {
+                       usort($parameters['items'], create_function('$item1,$item2', 'return strcasecmp($GLOBALS[\'LANG\']->sL($item1[0]),$GLOBALS[\'LANG\']->sL($item2[0]));'));
+       }
+}
+
 $TCA['tt_content'] = array(
        'ctrl' => $TCA['tt_content']['ctrl'],
        'interface' => array(
@@ -1288,6 +1294,7 @@ $TCA['tt_content'] = array(
                                                '',
                                        ),
                                ),
+                               'itemsProcFunc' => 'user_sortPluginList',
                                'default' => '',
                                'authMode' => $GLOBALS['TYPO3_CONF_VARS']['BE']['explicitADmode'],
                                'iconsInOptionTags' => 1,
@@ -2063,4 +2070,4 @@ $TCA['tt_content'] = array(
 );
 
 
-?>
\ No newline at end of file
+?>