Commit 52ca96d7 authored by Georg Ringer's avatar Georg Ringer Committed by Benni Mack
Browse files

[TASK] Cleanup TCA

Clean up the TCA:
- use integers instead of strings
- boolean values instead of strings or integers.
- remove default exclude value

Resolves: #77339
Releases: master
Change-Id: Ib1a30c75e392040504ee4b9ebe05fa710a4b274a
Reviewed-on: https://review.typo3.org/49296


Reviewed-by: Mathias Schreiber's avatarMathias Schreiber <mathias.schreiber@wmdb.de>
Tested-by: Mathias Schreiber's avatarMathias Schreiber <mathias.schreiber@wmdb.de>
Reviewed-by: Benni Mack's avatarBenni Mack <benni@typo3.org>
Tested-by: Benni Mack's avatarBenni Mack <benni@typo3.org>
parent 76871e3f
......@@ -137,7 +137,7 @@ class EvaluateDisplayConditionsTest extends UnitTestCase
'displayCond' => 'FIELD:mmType:!=:audio',
'config' => [
'type' => 'check',
'default' => '0',
'default' => 0,
'items' => [],
],
],
......@@ -221,7 +221,7 @@ class EvaluateDisplayConditionsTest extends UnitTestCase
'displayCond' => 'FIELD:mmType:!=:audio',
'config' => [
'type' => 'check',
'default' => '0',
'default' => 0,
'items' => [],
],
],
......@@ -229,7 +229,7 @@ class EvaluateDisplayConditionsTest extends UnitTestCase
'displayCond' => 'FIELD:mmType:=:audio',
'config' => [
'type' => 'check',
'default' => '0',
'default' => 0,
'items' => [],
],
],
......
......@@ -137,7 +137,7 @@ class TcaInlineConfigurationTest extends UnitTestCase
'config' => [
'type' => 'inline',
'foreign_table' => 'aForeignTableName',
'minitems' => '-23',
'minitems' => -23,
],
],
],
......
......@@ -301,7 +301,7 @@ class TcaInputPlaceholdersTest extends UnitTestCase
],
'metadata' => [
'config' => [
'readOnly' => 1,
'readOnly' => true,
'type' => 'inline',
'foreign_table' => 'sys_file_metadata',
'foreign_field' => 'file',
......@@ -385,7 +385,7 @@ class TcaInputPlaceholdersTest extends UnitTestCase
'columns' => [
'metadata' => [
'config' => [
'readOnly' => 1,
'readOnly' => true,
'type' => 'inline',
'foreign_table' => 'sys_file_metadata',
'foreign_field' => 'file',
......
......@@ -504,7 +504,7 @@ class TcaSelectItemsTest extends UnitTestCase
'columns' => [
'bar' => [
'label' => 'barColumnTitle',
'exclude' => 1,
'exclude' => true,
],
],
],
......@@ -536,7 +536,7 @@ class TcaSelectItemsTest extends UnitTestCase
'columns' => [
'bar' => [
'label' => 'barColumnTitle',
'exclude' => 1,
'exclude' => true,
],
],
],
......@@ -556,7 +556,7 @@ class TcaSelectItemsTest extends UnitTestCase
'columns' => [
'bar' => [
'label' => 'barColumnTitle',
'exclude' => 1,
'exclude' => true,
],
],
],
......
......@@ -189,7 +189,7 @@ class BackendUtilityTest extends UnitTestCase
'internal_type' => 'db',
'maxitems' => 22,
'minitems' => 0,
'show_thumbs' => 1,
'show_thumbs' => true,
'size' => 3,
),
),
......
......@@ -9,7 +9,7 @@ return array(
'delete' => 'deleted',
'default_sortby' => 'ORDER BY title',
'prependAtCopy' => 'LLL:EXT:lang/locallang_general.xlf:LGL.prependAtCopy',
'adminOnly' => 1,
'adminOnly' => true,
'rootLevel' => 1,
'typeicon_classes' => array(
'default' => 'status-user-group-backend'
......@@ -30,8 +30,8 @@ return array(
'label' => 'LLL:EXT:lang/locallang_tca.xlf:be_groups.title',
'config' => array(
'type' => 'input',
'size' => '25',
'max' => '50',
'size' => 25,
'max' => 50,
'eval' => 'trim,required'
)
),
......@@ -41,10 +41,10 @@ return array(
'type' => 'group',
'internal_type' => 'db',
'allowed' => 'pages',
'size' => '3',
'size' => 3,
'maxitems' => 100,
'autoSizeMax' => 10,
'show_thumbs' => '1',
'show_thumbs' => true,
'wizards' => array(
'suggest' => array(
'type' => 'suggest'
......@@ -59,7 +59,7 @@ return array(
'renderType' => 'selectMultipleSideBySide',
'foreign_table' => 'sys_filemounts',
'foreign_table_where' => ' AND sys_filemounts.pid=0 ORDER BY sys_filemounts.title',
'size' => '3',
'size' => 3,
'maxitems' => 100,
'autoSizeMax' => 10,
'wizards' => array(
......@@ -70,7 +70,7 @@ return array(
'module' => array(
'name' => 'wizard_edit',
),
'popup_onlyOpenIfSelected' => 1,
'popup_onlyOpenIfSelected' => true,
'icon' => 'actions-open',
'JSopenParams' => 'width=800,height=600,status=0,menubar=0,scrollbars=1'
),
......@@ -80,7 +80,7 @@ return array(
'icon' => 'actions-add',
'params' => array(
'table' => 'sys_filemounts',
'pid' => '0',
'pid' => 0,
'setValue' => 'prepend'
),
'module' => array(
......@@ -93,7 +93,7 @@ return array(
'icon' => 'actions-system-list-open',
'params' => array(
'table' => 'sys_filemounts',
'pid' => '0'
'pid' => 0
),
'module' => array(
'name' => 'wizard_list'
......@@ -148,7 +148,7 @@ return array(
'type' => 'select',
'renderType' => 'selectCheckBox',
'special' => 'pagetypes',
'size' => '5',
'size' => 5,
'autoSizeMax' => 50,
'maxitems' => 20,
)
......@@ -159,7 +159,7 @@ return array(
'type' => 'select',
'renderType' => 'selectCheckBox',
'special' => 'tables',
'size' => '5',
'size' => 5,
'autoSizeMax' => 50,
'maxitems' => 100,
)
......@@ -170,7 +170,7 @@ return array(
'type' => 'select',
'renderType' => 'selectCheckBox',
'special' => 'tables',
'size' => '5',
'size' => 5,
'autoSizeMax' => 50,
'maxitems' => 100,
)
......@@ -181,7 +181,7 @@ return array(
'type' => 'select',
'renderType' => 'selectCheckBox',
'special' => 'exclude',
'size' => '25',
'size' => 25,
'maxitems' => 1000,
'autoSizeMax' => 50,
)
......@@ -217,16 +217,16 @@ return array(
'label' => 'LLL:EXT:lang/locallang_general.xlf:LGL.disable',
'config' => array(
'type' => 'check',
'default' => '0'
'default' => 0
)
),
'lockToDomain' => array(
'label' => 'LLL:EXT:lang/locallang_tca.xlf:lockToDomain',
'config' => array(
'type' => 'input',
'size' => '20',
'size' => 20,
'eval' => 'trim',
'max' => '50',
'max' => 50,
'softref' => 'substitute'
)
),
......@@ -236,7 +236,7 @@ return array(
'type' => 'select',
'renderType' => 'selectCheckBox',
'special' => 'modListGroup',
'size' => '5',
'size' => 5,
'autoSizeMax' => 50,
'maxitems' => 100,
)
......@@ -247,15 +247,15 @@ return array(
'type' => 'text',
'rows' => 5,
'cols' => 30,
'max' => '2000',
'max' => 2000,
)
),
'TSconfig' => array(
'label' => 'LLL:EXT:lang/locallang_tca.xlf:TSconfig',
'config' => array(
'type' => 'text',
'cols' => '40',
'rows' => '5'
'cols' => 40,
'rows' => 5
),
'defaultExtras' => 'fixed-font : enable-tab'
),
......@@ -273,7 +273,7 @@ return array(
'renderType' => 'selectMultipleSideBySide',
'foreign_table' => 'be_groups',
'foreign_table_where' => 'AND NOT(be_groups.uid = ###THIS_UID###) AND be_groups.hidden=0 ORDER BY be_groups.title',
'size' => '5',
'size' => 5,
'autoSizeMax' => 50,
'maxitems' => 20,
)
......
......@@ -8,7 +8,7 @@ return array(
'crdate' => 'crdate',
'cruser_id' => 'cruser_id',
'delete' => 'deleted',
'adminOnly' => 1, // Only admin users can edit
'adminOnly' => true,
'rootLevel' => 1,
'default_sortby' => 'ORDER BY admin, username',
'enablecolumns' => array(
......@@ -35,8 +35,8 @@ return array(
'label' => 'LLL:EXT:lang/locallang_tca.xlf:be_users.username',
'config' => array(
'type' => 'input',
'size' => '20',
'max' => '50',
'size' => 20,
'max' => 50,
'eval' => 'nospace,trim,lower,unique,required',
'autocomplete' => false,
)
......@@ -47,15 +47,15 @@ return array(
'type' => 'text',
'rows' => 5,
'cols' => 30,
'max' => '2000',
'max' => 2000,
)
),
'password' => array(
'label' => 'LLL:EXT:lang/locallang_tca.xlf:be_users.password',
'config' => array(
'type' => 'input',
'size' => '20',
'max' => '40',
'size' => 20,
'max' => 40,
'eval' => 'trim,required,md5,password',
'autocomplete' => false,
)
......@@ -67,8 +67,8 @@ return array(
'renderType' => 'selectMultipleSideBySide',
'foreign_table' => 'be_groups',
'foreign_table_where' => 'ORDER BY be_groups.title',
'size' => '5',
'maxitems' => '20',
'size' => 5,
'maxitems' => 20,
'enableMultiSelectFilterTextfield' => true,
'wizards' => array(
'_VERTICAL' => 1,
......@@ -78,7 +78,7 @@ return array(
'module' => array(
'name' => 'wizard_edit',
),
'popup_onlyOpenIfSelected' => 1,
'popup_onlyOpenIfSelected' => true,
'icon' => 'actions-open',
'JSopenParams' => 'width=800,height=600,status=0,menubar=0,scrollbars=1'
),
......@@ -88,7 +88,7 @@ return array(
'icon' => 'actions-add',
'params' => array(
'table' => 'be_groups',
'pid' => '0',
'pid' => 0,
'setValue' => 'prepend'
),
'module' => array(
......@@ -101,7 +101,7 @@ return array(
'icon' => 'actions-system-list-open',
'params' => array(
'table' => 'be_groups',
'pid' => '0'
'pid' => 0
),
'module' => array(
'name' => 'wizard_list'
......@@ -122,9 +122,9 @@ return array(
'label' => 'LLL:EXT:lang/locallang_tca.xlf:lockToDomain',
'config' => array(
'type' => 'input',
'size' => '20',
'size' => 20,
'eval' => 'trim',
'max' => '50',
'max' => 50,
'softref' => 'substitute'
)
),
......@@ -134,10 +134,10 @@ return array(
'type' => 'group',
'internal_type' => 'db',
'allowed' => 'pages',
'size' => '3',
'size' => 3,
'maxitems' => 100,
'autoSizeMax' => 10,
'show_thumbs' => '1',
'show_thumbs' => true,
'wizards' => array(
'suggest' => array(
'type' => 'suggest'
......@@ -152,7 +152,7 @@ return array(
'renderType' => 'selectMultipleSideBySide',
'foreign_table' => 'sys_filemounts',
'foreign_table_where' => ' AND sys_filemounts.pid=0 ORDER BY sys_filemounts.title',
'size' => '3',
'size' => 3,
'maxitems' => 100,
'autoSizeMax' => 10,
'wizards' => array(
......@@ -164,7 +164,7 @@ return array(
'name' => 'wizard_edit',
),
'icon' => 'actions-open',
'popup_onlyOpenIfSelected' => 1,
'popup_onlyOpenIfSelected' => true,
'JSopenParams' => 'width=800,height=600,status=0,menubar=0,scrollbars=1'
),
'add' => array(
......@@ -173,7 +173,7 @@ return array(
'icon' => 'actions-add',
'params' => array(
'table' => 'sys_filemounts',
'pid' => '0',
'pid' => 0,
'setValue' => 'prepend'
),
'module' => array(
......@@ -186,7 +186,7 @@ return array(
'icon' => 'actions-system-list-open',
'params' => array(
'table' => 'sys_filemounts',
'pid' => '0'
'pid' => 0
),
'module' => array(
'name' => 'wizard_list'
......@@ -199,9 +199,9 @@ return array(
'label' => 'LLL:EXT:lang/locallang_general.xlf:LGL.email',
'config' => array(
'type' => 'input',
'size' => '20',
'size' => 20,
'eval' => 'trim',
'max' => '80',
'max' => 80,
'softref' => 'email[subst]'
)
),
......@@ -209,9 +209,9 @@ return array(
'label' => 'LLL:EXT:lang/locallang_general.xlf:LGL.name',
'config' => array(
'type' => 'input',
'size' => '20',
'size' => 20,
'eval' => 'trim',
'max' => '80'
'max' => 80
)
),
'disable' => array(
......@@ -230,7 +230,7 @@ return array(
'label' => 'LLL:EXT:lang/locallang_tca.xlf:be_users.admin',
'config' => array(
'type' => 'check',
'default' => '0'
'default' => 0
)
),
'options' => array(
......@@ -241,7 +241,7 @@ return array(
array('LLL:EXT:lang/locallang_tca.xlf:be_users.options_db_mounts', 0),
array('LLL:EXT:lang/locallang_tca.xlf:be_users.options_file_mounts', 0)
),
'default' => '3'
'default' => 3
)
),
'file_permissions' => array(
......@@ -288,18 +288,18 @@ return array(
'label' => 'LLL:EXT:lang/locallang_general.xlf:LGL.starttime',
'config' => array(
'type' => 'input',
'size' => '13',
'size' => 13,
'eval' => 'datetime',
'default' => '0'
'default' => 0
)
),
'endtime' => array(
'label' => 'LLL:EXT:lang/locallang_general.xlf:LGL.endtime',
'config' => array(
'type' => 'input',
'size' => '13',
'size' => 13,
'eval' => 'datetime',
'default' => '0',
'default' => 0,
'range' => array(
'upper' => mktime(0, 0, 0, 1, 1, 2038)
)
......@@ -321,9 +321,9 @@ return array(
'type' => 'select',
'renderType' => 'selectCheckBox',
'special' => 'modListUser',
'size' => '5',
'size' => 5,
'autoSizeMax' => 50,
'maxitems' => '100',
'maxitems' => 100,
)
),
'allowed_languages' => array(
......@@ -332,15 +332,15 @@ return array(
'type' => 'select',
'renderType' => 'selectCheckBox',
'special' => 'languages',
'maxitems' => '1000',
'maxitems' => 1000,
)
),
'TSconfig' => array(
'label' => 'LLL:EXT:lang/locallang_tca.xlf:TSconfig',
'config' => array(
'type' => 'text',
'cols' => '40',
'rows' => '5'
'cols' => 40,
'rows' => 5
),
'defaultExtras' => 'fixed-font : enable-tab'
),
......@@ -353,8 +353,8 @@ return array(
'label' => 'LLL:EXT:lang/locallang_general.xlf:LGL.lastlogin',
'config' => array(
'type' => 'input',
'readOnly' => '1',
'size' => '12',
'readOnly' => true,
'size' => 12,
'eval' => 'datetime',
'default' => 0
)
......
......@@ -10,7 +10,7 @@ return array(
'origUid' => 't3_origuid',
'delete' => 'deleted',
'crdate' => 'crdate',
'hideAtCopy' => 1,
'hideAtCopy' => true,
'prependAtCopy' => 'LLL:EXT:lang/locallang_general.xlf:LGL.prependAtCopy',
'cruser_id' => 'cruser_id',
'editlock' => 'editlock',
......@@ -66,7 +66,7 @@ return array(
),
'columns' => array(
'doktype' => array(
'exclude' => 1,
'exclude' => true,
'label' => 'LLL:EXT:lang/locallang_general.xlf:LGL.type',
'config' => array(
'type' => 'select',
......@@ -132,23 +132,23 @@ return array(
'label' => 'LLL:EXT:lang/locallang_tca.xlf:title',
'config' => array(
'type' => 'input',
'size' => '50',
'max' => '255',
'size' => 50,
'max' => 255,
'eval' => 'trim,required'
)
),
'TSconfig' => array(
'exclude' => 1,
'exclude' => true,
'label' => 'TSconfig:',
'config' => array(
'type' => 'text',
'cols' => '40',
'rows' => '5'
'cols' => 40,
'rows' => 5
),
'defaultExtras' => 'fixed-font : enable-tab'
),
'php_tree_stop' => array(
'exclude' => 1,
'exclude' => true,
'label' => 'LLL:EXT:lang/locallang_tca.xlf:php_tree_stop',
'config' => array(
'type' => 'check',
......@@ -164,12 +164,12 @@ return array(
'label' => 'LLL:EXT:lang/locallang_general.xlf:LGL.versionLabel',
'config' => array(
'type' => 'input',
'size' => '23',
'max' => '255'
'size' => 23,
'max' => 255
)
),
'editlock' => array(
'exclude' => 1,
'exclude' => true,
'label' => 'LLL:EXT:lang/locallang_tca.xlf:editlock',
'config' => array(
'type' => 'check',
......@@ -181,11 +181,11 @@ return array(
)
),
'hidden' => array(
'exclude' => 1,
'exclude' => true,
'label' => 'LLL:EXT:frontend/Resources/Private/Language/locallang_tca.xlf:pages.hidden',
'config' => array(
'type' => 'check',
'default' => '1',
'default' => 1,
'items' => array(
'1' => array(
'0' => 'LLL:EXT:frontend/Resources/Private/Language/locallang_tca.xlf:pages.hidden_checkbox_1_formlabel'
......@@ -194,30 +194,30 @@ return array(
)
),
'starttime' => array(
'exclude' => 1,
'exclude' => true,
'label' => 'LLL:EXT:lang/locallang_general.xlf:LGL.starttime',
'config' => array(
'type' => 'input',
'size' => '13',
'size' => 13,
'eval' => 'datetime',
'default' => '0'
'default' => 0
)
),
'endtime' => array(
'exclude' => 1,
'exclude' => true,
'label' => 'LLL:EXT:lang/locallang_general.xlf:LGL.endtime',
'config' => array(
'type' => 'input',
'size' => '13',
'size' => 13,
'eval' => 'datetime',
'default' => '0',
'default' => 0,
'range' => array(
'upper' => mktime(0, 0, 0, 1, 1, 2038)
)
)
),
'layout' => array(
'exclude' => 1,
'exclude' => true,
'label' => 'LLL:EXT:lang/locallang_general.xlf:LGL.layout',
'config' => array(
'type' => 'select',
......@@ -240,11 +240,11 @@ return array(
'3'
)
),
'default' => '0'
'default' => 0
)
),
'url_scheme' => array(
'exclude' => 1,
'exclude' => true,
'label' => 'LLL:EXT:frontend/Resources/Private/Language/locallang_tca.xlf:pages.url_scheme',