[BUGFIX] Category tab not shown for file when filemetadata installed
[Packages/TYPO3.CMS.git] / typo3 / sysext / filemetadata / Configuration / TCA / Overrides / sys_file_metadata.php
index c57248c..2f40249 100644 (file)
@@ -440,3 +440,11 @@ $tca = array(
 );
 
 $GLOBALS['TCA']['sys_file_metadata'] = array_replace_recursive($GLOBALS['TCA']['sys_file_metadata'], $tca);
+
+// Add category tab if categories column is present
+if (isset($GLOBALS['TCA']['sys_file_metadata']['columns']['categories'])) {
+       \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addToAllTCAtypes(
+               'sys_file_metadata',
+               '--div--;LLL:EXT:lang/locallang_tca.xlf:sys_category.tabs.category,categories'
+       );
+}