Fixed bug #13444: Filemounts are unsorted
authorSteffen Kamper <info@sk-typo3.de>
Sun, 21 Feb 2010 18:54:27 +0000 (18:54 +0000)
committerSteffen Kamper <info@sk-typo3.de>
Sun, 21 Feb 2010 18:54:27 +0000 (18:54 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@6949 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
t3lib/class.t3lib_userauthgroup.php
t3lib/stddb/tables.php
t3lib/stddb/tables.sql

index f64c88c..519ffd8 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2010-02-21  Steffen Kamper  <info@sk-typo3.de>
+
+       * Fixed bug #13444: Filemounts are unsorted
+
 2010-02-21  Benjamin Mack  <benni@typo3.org>
 
        * Fixed #12052: Restructure output of module "DB check" -> "Reference Index" (Thanks to Steffen Gebert)
index 6038246..e65c5dc 100644 (file)
@@ -1232,9 +1232,11 @@ class t3lib_userAuthGroup extends t3lib_userAuth {
                        }
 
                                // Processing filemounts
+                       t3lib_div::loadTCA('sys_filemounts');
+                       $orderBy = $GLOBALS['TCA']['sys_filemounts']['ctrl']['default_sortby'] ? $GLOBALS['TYPO3_DB']->stripOrderBy($GLOBALS['TCA']['sys_filemounts']['ctrl']['default_sortby']) : 'sorting';
                        $this->dataLists['filemount_list'] = t3lib_div::uniqueList($this->dataLists['filemount_list']);
                        if ($this->dataLists['filemount_list']) {
-                               $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('*', 'sys_filemounts', 'deleted=0 AND hidden=0 AND pid=0 AND uid IN ('.$this->dataLists['filemount_list'].')');
+                               $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('*', 'sys_filemounts', 'deleted=0 AND hidden=0 AND pid=0 AND uid IN ('.$this->dataLists['filemount_list'].')', '', $orderBy);
                                while ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res))      {
                                        $this->addFileMount($row['title'], $row['path'], $row['path'], $row['base']?1:0, '');
                                }
index b7939ba..69e1344 100644 (file)
@@ -336,6 +336,7 @@ $TCA['sys_filemounts'] = array(
        'ctrl' => array(
                'label' => 'title',
                'tstamp' => 'tstamp',
+               'sortby' => 'sorting',
                'prependAtCopy' => 'LLL:EXT:lang/locallang_general.php:LGL.prependAtCopy',
                'title' => 'LLL:EXT:lang/locallang_tca.php:sys_filemounts',
                'adminOnly' => 1,
index 8aa45c6..b2dd40c 100644 (file)
@@ -266,6 +266,7 @@ CREATE TABLE sys_filemounts (
   base tinyint(4) unsigned DEFAULT '0' NOT NULL,
   hidden tinyint(3) unsigned DEFAULT '0' NOT NULL,
   deleted tinyint(1) unsigned DEFAULT '0' NOT NULL,
+  sorting int(11) unsigned DEFAULT '0' NOT NULL,
   PRIMARY KEY (uid),
   KEY parent (pid)
 );