[BUGFIX] Sorting not respected for backend layout dropdowns 10/20710/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 07:14:45 +0000 (09:14 +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.5, 4.7, 6.0, 6.1, 6.2
Reviewed-on: https://review.typo3.org/20710
Reviewed-by: Anja Leichsenring
Tested-by: Anja Leichsenring
typo3/sysext/core/Configuration/TCA/pages.php

index f15b48f..0b6972d 100644 (file)
@@ -770,7 +770,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)
@@ -787,7 +787,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)