Skip to content
Snippets Groups Projects
Commit 566c6d60 authored by Marcin Sągol's avatar Marcin Sągol Committed by Andreas Kienast
Browse files

[TASK] Sort table and field list in DB Check module by labels

When we use DB Check module and our project has large number of
tables configured in the TCA it is often hard to quickly find on the
select list the one we are interested with.

This commit adds small changes to `DatabaseIntegrityController` to:
- sort (ASC) available tables list by table label
- if table label is not defined, use raw table name wrapped with [...]
- sort (ASC) fields defined for table by their labels
- if field label is not defined, [FIELD: xxx] is used as before

Examples for table label

$GLOBALS['TCA']['sys_file']['title'] = 'Label';
- result without debug mode enabled in the BE: 'Label'
- result with debug mode disabled in BE: 'Label [sys_file]'

$GLOBALS['TCA']['sys_file']['title'] = '';
- result without debug mode enabled in the BE: '[sys_file]'
- result with debug mode disabled in BE: '[sys_file]'

Examples for field label

$GLOBALS['TCA']['sys_file']['title']['columns']['field']['label'] = 'Label';
- result without debug mode enabled in the BE: 'Label'
- result with debug mode disabled in BE: 'Label [field]'

$GLOBALS['TCA']['sys_file']['title']['columns']['field']['label'] = '';
- result without debug mode enabled in the BE: '[FIELD: field]'
- result with debug mode disabled in BE: '[FIELD: field] [field]'

Resolves: #98110
Releases: main, 12.4
Change-Id: I6511ee44f2503b9908a9bdc9f06b508c2f049483
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/82480


Tested-by: default avatarAndreas Kienast <a.fernandez@scripting-base.de>
Reviewed-by: default avatarAndreas Kienast <a.fernandez@scripting-base.de>
Tested-by: default avatarcore-ci <typo3@b13.com>
parent 7a9cfb2b
Branches
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment