[BUGFIX] Sanitize undefined TCA columns required for data integrity
[Packages/TYPO3.CMS.git] / typo3 / sysext / core / Configuration / TCA / sys_file_metadata.php
1 <?php
2 return [
3 'ctrl' => [
4 'title' => 'LLL:EXT:core/Resources/Private/Language/locallang_tca.xlf:sys_file_metadata',
5 'label' => 'file',
6 'tstamp' => 'tstamp',
7 'crdate' => 'crdate',
8 'cruser_id' => 'cruser_id',
9 'type' => 'file:type',
10 'hideTable' => true,
11 'rootLevel' => 1,
12 'languageField' => 'sys_language_uid',
13 'transOrigPointerField' => 'l10n_parent',
14 'transOrigDiffSourceField' => 'l10n_diffsource',
15 'versioningWS' => true,
16 'origUid' => 't3_origuid',
17 'default_sortby' => 'crdate DESC',
18 'typeicon_classes' => [
19 'default' => 'mimetypes-other-other'
20 ],
21 'security' => [
22 'ignoreWebMountRestriction' => true,
23 'ignoreRootLevelRestriction' => true,
24 ],
25 'searchFields' => 'file,title,description,alternative'
26 ],
27 'interface' => [
28 'showRecordFieldList' => 'file, title, description, alternative'
29 ],
30 'columns' => [
31 'sys_language_uid' => [
32 'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.language',
33 'config' => [
34 'type' => 'select',
35 'renderType' => 'selectSingle',
36 'foreign_table' => 'sys_language',
37 'foreign_table_where' => 'ORDER BY sys_language.title',
38 'items' => [
39 ['LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.allLanguages', -1],
40 ['LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.default_value', 0]
41 ],
42 'default' => 0,
43 'fieldWizard' => [
44 'selectIcons' => [
45 'disabled' => false,
46 ],
47 ],
48 ]
49 ],
50 'l10n_parent' => [
51 'displayCond' => 'FIELD:sys_language_uid:>:0',
52 'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.l18n_parent',
53 'config' => [
54 'type' => 'select',
55 'renderType' => 'selectSingle',
56 'items' => [
57 ['', 0]
58 ],
59 'foreign_table' => 'sys_file_metadata',
60 'foreign_table_where' => 'AND sys_file_metadata.uid=###REC_FIELD_l10n_parent### AND sys_file_metadata.sys_language_uid IN (-1,0)',
61 'default' => 0
62 ]
63 ],
64 'l10n_diffsource' => [
65 'config' => [
66 'type' => 'passthrough',
67 'default' => ''
68 ]
69 ],
70 'fileinfo' => [
71 'config' => [
72 'type' => 'user',
73 'renderType' => 'fileInfo',
74 ]
75 ],
76 'file' => [
77 'displayCond' => 'FIELD:sys_language_uid:=:0',
78 'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_tca.xlf:sys_file',
79 'config' => [
80 'readOnly' => true,
81 'type' => 'select',
82 'renderType' => 'selectSingle',
83 'foreign_table' => 'sys_file',
84 'foreign_table_where' => 'AND sys_file.uid = ###REC_FIELD_file###',
85 'minitems' => 1,
86 'maxitems' => 1,
87 'size' => 1,
88 'default' => 0,
89 ]
90 ],
91 'title' => [
92 'exclude' => true,
93 'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_tca.xlf:sys_file.title',
94 'l10n_mode' => 'prefixLangTitle',
95 'config' => [
96 'type' => 'input',
97 'size' => 30,
98 'placeholder' => '__row|file|name'
99 ]
100 ],
101 'description' => [
102 'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_tca.xlf:sys_file.description',
103 'l10n_mode' => 'prefixLangTitle',
104 'config' => [
105 'type' => 'text',
106 'cols' => 40,
107 'rows' => 3
108 ]
109 ],
110 'alternative' => [
111 'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_tca.xlf:sys_file.alternative',
112 'l10n_mode' => 'prefixLangTitle',
113 'config' => [
114 'type' => 'input',
115 'size' => 30,
116 ]
117 ],
118 'width' => [
119 'l10n_mode' => 'exclude',
120 'l10n_display' => 'defaultAsReadonly',
121 'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_tca.xlf:file.width',
122 'config' => [
123 'type' => 'input',
124 'size' => 10,
125 'max' => 20,
126 'eval' => 'int',
127 'default' => 0,
128 'readOnly' => true,
129 ],
130 ],
131 'height' => [
132 'l10n_mode' => 'exclude',
133 'l10n_display' => 'defaultAsReadonly',
134 'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_tca.xlf:file.height',
135 'config' => [
136 'type' => 'input',
137 'size' => 10,
138 'max' => 20,
139 'eval' => 'int',
140 'default' => 0,
141 'readOnly' => true,
142 ],
143 ],
144 ],
145 'types' => [
146 '1' => ['showitem' => '
147 --div--;LLL:EXT:core/Resources/Private/Language/Form/locallang_tabs.xlf:general,
148 fileinfo, title, description, alternative, --palette--;;language,
149 --div--;LLL:EXT:core/Resources/Private/Language/Form/locallang_tabs.xlf:categories,
150 categories,
151 --div--;LLL:EXT:core/Resources/Private/Language/Form/locallang_tabs.xlf:extended,
152 ']
153 ],
154 'palettes' => [
155 'language' => [
156 'showitem' => 'sys_language_uid, l10n_parent',
157 'isHiddenPalette' => true,
158 ],
159 ]
160 ];