[TASK] add mtime sort test for getFilesInDir()
[Packages/TYPO3.CMS.git] / typo3 / sysext / cms / ext_tables.php
1 <?php
2 if (!defined('TYPO3_MODE')) {
3 die('Access denied.');
4 }
5 if (TYPO3_MODE == 'BE') {
6 \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addModule('web', 'layout', 'top', \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($_EXTKEY) . 'layout/');
7 \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addLLrefForTCAdescr('_MOD_web_layout', 'EXT:cms/locallang_csh_weblayout.xlf');
8 \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addLLrefForTCAdescr('_MOD_web_info', 'EXT:cms/locallang_csh_webinfo.xlf');
9 \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::insertModuleFunction('web_info', 'tx_cms_webinfo_page', \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($_EXTKEY) . 'web_info/class.tx_cms_webinfo.php', 'LLL:EXT:cms/locallang_tca.xlf:mod_tx_cms_webinfo_page');
10 \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::insertModuleFunction('web_info', 'tx_cms_webinfo_lang', \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($_EXTKEY) . 'web_info/class.tx_cms_webinfo_lang.php', 'LLL:EXT:cms/locallang_tca.xlf:mod_tx_cms_webinfo_lang');
11 }
12 // Add allowed records to pages:
13 \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::allowTableOnStandardPages('pages_language_overlay,tt_content,sys_template,sys_domain,backend_layout');
14
15 if (!function_exists('user_sortPluginList')) {
16 function user_sortPluginList(array &$parameters) {
17 usort(
18 $parameters['items'],
19 function ($item1, $item2) {
20 return strcasecmp($GLOBALS['LANG']->sL($item1[0]), $GLOBALS['LANG']->sL($item2[0]));
21 }
22 );
23 }
24 }
25
26 // keep old code (pre-FAL) for installations that haven't upgraded yet. please remove this code in TYPO3 7.0
27 // @deprecated since TYPO3 6.0, please remove in TYPO3 7.0
28 // existing installation - and files are merged, nothing to do
29 if ((!isset($GLOBALS['TYPO3_CONF_VARS']['INSTALL']['wizardDone']['TYPO3\\CMS\\Install\\Updates\\TceformsUpdateWizard']) || !\TYPO3\CMS\Core\Utility\GeneralUtility::inList($GLOBALS['TYPO3_CONF_VARS']['INSTALL']['wizardDone']['TYPO3\\CMS\\Install\\Updates\\TceformsUpdateWizard'], 'tt_content:image')) && !\TYPO3\CMS\Core\Utility\GeneralUtility::compat_version('6.0')) {
30 \TYPO3\CMS\Core\Utility\GeneralUtility::deprecationLog('This installation hasn\'t been migrated to FAL for the field $TCA[tt_content][columns][image] yet. Please do so before TYPO3 v7.');
31 // Existing installation and no upgrade wizard was executed - and files haven't been merged: use the old code
32 $GLOBALS['TCA']['tt_content']['columns']['image']['config'] = array(
33 'type' => 'group',
34 'internal_type' => 'file',
35 'allowed' => $GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext'],
36 'max_size' => $GLOBALS['TYPO3_CONF_VARS']['BE']['maxFileSize'],
37 'uploadfolder' => 'uploads/pics',
38 'show_thumbs' => '1',
39 'size' => '3',
40 'maxitems' => '200',
41 'minitems' => '0',
42 'autoSizeMax' => 40
43 );
44 }
45
46 if ((!isset($GLOBALS['TYPO3_CONF_VARS']['INSTALL']['wizardDone']['TYPO3\\CMS\\Install\\Updates\\TceformsUpdateWizard']) || !\TYPO3\CMS\Core\Utility\GeneralUtility::inList($GLOBALS['TYPO3_CONF_VARS']['INSTALL']['wizardDone']['TYPO3\\CMS\\Install\\Updates\\TceformsUpdateWizard'], 'tt_content:media')) && !\TYPO3\CMS\Core\Utility\GeneralUtility::compat_version('6.0')) {
47 \TYPO3\CMS\Core\Utility\GeneralUtility::deprecationLog('This installation hasn\'t been migrated to FAL for the field $TCA[tt_content][columns][media] yet. Please do so before TYPO3 v7.');
48 // Existing installation and no upgrade wizard was executed - and files haven't been merged: use the old code
49 $GLOBALS['TCA']['tt_content']['columns']['media']['config'] = array(
50 'type' => 'group',
51 'internal_type' => 'file',
52 'allowed' => '',
53 // Must be empty for disallowed to work.
54 'disallowed' => PHP_EXTENSIONS_DEFAULT,
55 'max_size' => $GLOBALS['TYPO3_CONF_VARS']['BE']['maxFileSize'],
56 'uploadfolder' => 'uploads/media',
57 'show_thumbs' => '1',
58 'size' => '3',
59 'maxitems' => '10',
60 'minitems' => '0'
61 );
62 }
63
64 // Keep old code (pre-FAL) for installations that haven't upgraded yet.
65 // @deprecated since TYPO3 6.0, please remove at earliest in TYPO3 6.2
66 // existing installation - and files are merged, nothing to do
67 if ((!isset($GLOBALS['TYPO3_CONF_VARS']['INSTALL']['wizardDone']['TYPO3\\CMS\\Install\\Updates\\TceformsUpdateWizard']) || !\TYPO3\CMS\Core\Utility\GeneralUtility::inList($GLOBALS['TYPO3_CONF_VARS']['INSTALL']['wizardDone']['TYPO3\\CMS\\Install\\Updates\\TceformsUpdateWizard'], 'pages_language_overlay:media')) && !\TYPO3\CMS\Core\Utility\GeneralUtility::compat_version('6.0')) {
68 \TYPO3\CMS\Core\Utility\GeneralUtility::deprecationLog('This installation hasn\'t been migrated to FAL for the field $TCA[pages_language_overlay][columns][media] yet. Please do so before TYPO3 v7.');
69 // Existing installation and no upgrade wizard was executed - and files haven't been merged: use the old code
70 $GLOBALS['TCA']['pages_language_overlay']['columns']['media']['config'] = array(
71 'type' => 'group',
72 'internal_type' => 'file',
73 'allowed' => $TCA['pages']['columns']['media']['config']['allowed'],
74 'max_size' => $GLOBALS['TYPO3_CONF_VARS']['BE']['maxFileSize'],
75 'uploadfolder' => 'uploads/media',
76 'show_thumbs' => '1',
77 'size' => '3',
78 'maxitems' => '100',
79 'minitems' => '0'
80 );
81 }