[BUGFIX] Fix foreign_table for l10n_parent in sys_file_metadata
[Packages/TYPO3.CMS.git] / typo3 / sysext / core / Configuration / TCA / sys_file_metadata.php
1 <?php
2 return array(
3 'ctrl' => array(
4 'title' => 'LLL:EXT:lang/locallang_tca.xlf:sys_file_metadata',
5 'label' => 'file',
6 'tstamp' => 'tstamp',
7 'crdate' => 'crdate',
8 'cruser_id' => 'cruser_id',
9 'type' => 'type',
10 'hideTable' => TRUE,
11 'rootLevel' => TRUE,
12 'languageField' => 'sys_language_uid',
13 'transOrigPointerField' => 'l10n_parent',
14 'transOrigDiffSourceField' => 'l10n_diffsource',
15 'versioningWS' => TRUE,
16 'origUid' => 't3_origuid',
17 'default_sortby' => 'ORDER BY crdate DESC',
18 'dividers2tabs' => TRUE,
19 'typeicon_classes' => array(
20 'default' => 'mimetypes-other-other'
21 ),
22 'security' => array(
23 'ignoreWebMountRestriction' => TRUE,
24 'ignoreRootLevelRestriction' => TRUE,
25 ),
26 'searchFields' => 'file,title,description,alternative'
27 ),
28 'interface' => array(
29 'showRecordFieldList' => 'file, title, description, alternative'
30 ),
31 'columns' => array(
32 'sys_language_uid' => array(
33 'exclude' => 0,
34 'label' => 'LLL:EXT:lang/locallang_general.xlf:LGL.language',
35 'config' => array(
36 'type' => 'select',
37 'foreign_table' => 'sys_language',
38 'foreign_table_where' => 'ORDER BY sys_language.title',
39 'items' => array(
40 array('LLL:EXT:lang/locallang_general.xlf:LGL.allLanguages', -1),
41 array('LLL:EXT:lang/locallang_general.xlf:LGL.default_value', 0)
42 )
43 )
44 ),
45 'l10n_parent' => array(
46 'displayCond' => 'FIELD:sys_language_uid:>:0',
47 'exclude' => 0,
48 'label' => 'LLL:EXT:lang/locallang_general.xlf:LGL.l18n_parent',
49 'config' => array(
50 'type' => 'select',
51 'items' => array(
52 array('', 0)
53 ),
54 'foreign_table' => 'sys_file_metadata',
55 'foreign_table_where' => 'AND sys_file_metadata.uid=###REC_FIELD_l10n_parent### AND sys_file_metadata.sys_language_uid IN (-1,0)'
56 )
57 ),
58 'l10n_diffsource' => array(
59 'exclude' => 0,
60 'config' => array(
61 'type' => 'passthrough'
62 )
63 ),
64 't3ver_label' => array(
65 'label' => 'LLL:EXT:lang/locallang_general.xlf:LGL.versionLabel',
66 'config' => array(
67 'type' => 'input',
68 'size' => '30',
69 'max' => '30'
70 )
71 ),
72 'fileinfo' => array(
73 'config' => array(
74 'type' => 'user',
75 'userFunc' => 'typo3/sysext/core/Classes/Resource/Hook/FileInfoHook.php:TYPO3\CMS\Core\Resource\Hook\FileInfoHook->renderFileMetadataInfo'
76 )
77 ),
78 'file' => array(
79 'displayCond' => 'FIELD:sys_language_uid:=:0',
80 'exclude' => 0,
81 'label' => 'LLL:EXT:lang/locallang_tca.xlf:sys_file',
82 'config' => array(
83 'readOnly' => 1,
84 'type' => 'select',
85 'foreign_table' => 'sys_file',
86 'minitems' => 1,
87 'maxitems' => 1,
88 'size' => 1,
89 )
90 ),
91 'title' => array(
92 'exclude' => 1,
93 'label' => 'LLL:EXT:lang/locallang_tca.xlf:sys_file.title',
94 'l10n_mode' => 'prefixLangTitle',
95 'config' => array(
96 'type' => 'input',
97 'size' => '30',
98 'placeholder' => '__row|file|name'
99 )
100 ),
101 'description' => array(
102 'exclude' => 0,
103 'label' => 'LLL:EXT:lang/locallang_tca.xlf:sys_file.description',
104 'l10n_mode' => 'prefixLangTitle',
105 'config' => array(
106 'type' => 'text',
107 'cols' => '40',
108 'rows' => '3'
109 )
110 ),
111 'alternative' => array(
112 'exclude' => 0,
113 'label' => 'LLL:EXT:lang/locallang_tca.xlf:sys_file.alternative',
114 'config' => array(
115 'type' => 'text',
116 'cols' => '40',
117 'rows' => '3'
118 )
119 ),
120 'width' => array(
121 'exclude' => 0,
122 'l10n_mode' => 'exclude'
123 ),
124 'height' => array(
125 'exclude' => 0,
126 'l10n_mode' => 'exclude'
127 )
128 ),
129 'types' => array(
130 '1' => array('showitem' => 'fileinfo, title, description, alternative')
131 ),
132 'palettes' => array()
133 );