[BUGFIX] Sorting not respected for backend layout dropdowns 44/20444/2
authorPatrick Broens <patrick@patrickbroens.nl>
Fri, 3 May 2013 06:17:25 +0000 (08:17 +0200)
committerAnja Leichsenring <aleichsenring@ab-softlab.de>
Sun, 12 May 2013 06:18:35 +0000 (08:18 +0200)
The core record backend_layout can be sorted manually, but this is not
reflected in the pages TCA for the dropdowns backend_layout and
backend_layout_next_level.

This patch fixes this issue by adding the sorting in the foreign_where
clause

Thanks to Frans Saris for reporting this issue

Change-Id: I04680278075ddc0de69600423be5fe783e34f562
Resolves: #47688
Releases: 4.7, 6.0, 6.1, 6.2
Reviewed-on: https://review.typo3.org/20444
Reviewed-by: Wouter Wolters
Reviewed-by: Steffen Müller
Tested-by: Steffen Müller
Reviewed-by: Frans Saris
Tested-by: Frans Saris
Reviewed-by: Stefan Neufeind
Tested-by: Stefan Neufeind
Reviewed-by: Anja Leichsenring
Tested-by: Anja Leichsenring
typo3/sysext/core/Configuration/TCA/pages.php

index ec9ce73..3e3c4f2 100644 (file)
@@ -760,7 +760,7 @@ return array(
                        'config' => array(
                                'type' => 'select',
                                'foreign_table' => 'backend_layout',
-                               'foreign_table_where' => 'AND ( ( ###PAGE_TSCONFIG_ID### = 0 AND ###STORAGE_PID### = 0 ) OR ( backend_layout.pid = ###PAGE_TSCONFIG_ID### OR backend_layout.pid = ###STORAGE_PID### ) OR ( ###PAGE_TSCONFIG_ID### = 0 AND backend_layout.pid = ###THIS_UID### ) ) AND backend_layout.hidden = 0',
+                               'foreign_table_where' => 'AND ( ( ###PAGE_TSCONFIG_ID### = 0 AND ###STORAGE_PID### = 0 ) OR ( backend_layout.pid = ###PAGE_TSCONFIG_ID### OR backend_layout.pid = ###STORAGE_PID### ) OR ( ###PAGE_TSCONFIG_ID### = 0 AND backend_layout.pid = ###THIS_UID### ) ) AND backend_layout.hidden = 0 ORDER BY backend_layout.sorting',
                                'items' => array(
                                        array('', 0),
                                        array('LLL:EXT:cms/locallang_tca.xlf:pages.backend_layout.none', -1)
@@ -777,7 +777,7 @@ return array(
                        'config' => array(
                                'type' => 'select',
                                'foreign_table' => 'backend_layout',
-                               'foreign_table_where' => 'AND ( ( ###PAGE_TSCONFIG_ID### = 0 AND ###STORAGE_PID### = 0 ) OR ( backend_layout.pid = ###PAGE_TSCONFIG_ID### OR backend_layout.pid = ###STORAGE_PID### ) OR ( ###PAGE_TSCONFIG_ID### = 0 AND backend_layout.pid = ###THIS_UID### ) ) AND backend_layout.hidden = 0',
+                               'foreign_table_where' => 'AND ( ( ###PAGE_TSCONFIG_ID### = 0 AND ###STORAGE_PID### = 0 ) OR ( backend_layout.pid = ###PAGE_TSCONFIG_ID### OR backend_layout.pid = ###STORAGE_PID### ) OR ( ###PAGE_TSCONFIG_ID### = 0 AND backend_layout.pid = ###THIS_UID### ) ) AND backend_layout.hidden = 0 ORDER BY backend_layout.sorting',
                                'items' => array(
                                        array('', 0),
                                        array('LLL:EXT:cms/locallang_tca.xlf:pages.backend_layout.none', -1)
@@ -1052,4 +1052,4 @@ return array(
                )
        )
 );
-?>
\ No newline at end of file
+?>