[BUGFIX] Fix PHP warning in EXT:beuser
[Packages/TYPO3.CMS.git] / typo3 / sysext / scheduler / ext_localconf.php
1 <?php
2
3 if (!defined ('TYPO3_MODE')) {
4 die ('Access denied.');
5 }
6
7 // Register the Scheduler as a possible key for CLI calls
8 $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['GLOBAL']['cliKeys'][$_EXTKEY] = array(
9 'EXT:' . $_EXTKEY . '/cli/scheduler_cli_dispatch.php', '_CLI_scheduler'
10 );
11
12 // Get the extensions's configuration
13 $extConf = unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['scheduler']);
14
15 // If sample tasks should be shown,
16 // register information for the test and sleep tasks
17 if (!empty($extConf['showSampleTasks'])) {
18 $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['scheduler']['tasks']['tx_scheduler_TestTask'] = array(
19 'extension' => $_EXTKEY,
20 'title' => 'LLL:EXT:' . $_EXTKEY . '/locallang.xml:testTask.name',
21 'description' => 'LLL:EXT:' . $_EXTKEY . '/locallang.xml:testTask.description',
22 'additionalFields' => 'tx_scheduler_TestTask_AdditionalFieldProvider'
23 );
24 $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['scheduler']['tasks']['tx_scheduler_SleepTask'] = array(
25 'extension' => $_EXTKEY,
26 'title' => 'LLL:EXT:' . $_EXTKEY . '/locallang.xml:sleepTask.name',
27 'description' => 'LLL:EXT:' . $_EXTKEY . '/locallang.xml:sleepTask.description',
28 'additionalFields' => 'tx_scheduler_SleepTask_AdditionalFieldProvider'
29 );
30 }
31
32 // Add caching framework garbage collection task
33 $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['scheduler']['tasks']['tx_scheduler_CachingFrameworkGarbageCollection'] = array(
34 'extension' => $_EXTKEY,
35 'title' => 'LLL:EXT:' . $_EXTKEY . '/locallang.xml:cachingFrameworkGarbageCollection.name',
36 'description' => 'LLL:EXT:' . $_EXTKEY . '/locallang.xml:cachingFrameworkGarbageCollection.description',
37 'additionalFields' => 'tx_scheduler_CachingFrameworkGarbageCollection_AdditionalFieldProvider',
38 );
39
40 // Add file indexing task
41 $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['scheduler']['tasks']['tx_scheduler_FileIndexing'] = array(
42 'extension' => $_EXTKEY,
43 'title' => 'LLL:EXT:' . $_EXTKEY . '/locallang.xml:fileIndexing.name',
44 'description' => 'LLL:EXT:' . $_EXTKEY . '/locallang.xml:fileIndexing.description',
45 );
46
47 // Add recycler directory cleanup task. Windows is not supported
48 // because "filectime" does not change after moving a file
49 if (TYPO3_OS != 'WIN') {
50 $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['scheduler']['tasks']['tx_scheduler_RecyclerGarbageCollection'] = array(
51 'extension' => $_EXTKEY,
52 'title' => 'LLL:EXT:' . $_EXTKEY . '/locallang.xml:recyclerGarbageCollection.name',
53 'description' => 'LLL:EXT:' . $_EXTKEY . '/locallang.xml:recyclerGarbageCollection.description',
54 'additionalFields' => 'tx_scheduler_RecyclerGarbageCollection_AdditionalFieldProvider',
55 );
56 }
57
58 // Add table garbage collection task
59 $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['scheduler']['tasks']['tx_scheduler_TableGarbageCollection'] = array(
60 'extension' => $_EXTKEY,
61 'title' => 'LLL:EXT:' . $_EXTKEY . '/locallang.xml:tableGarbageCollection.name',
62 'description' => 'LLL:EXT:' . $_EXTKEY . '/locallang.xml:tableGarbageCollection.description',
63 'additionalFields' => 'tx_scheduler_TableGarbageCollection_AdditionalFieldProvider',
64 );
65 // Initialize option array of table garbage collection task if not already done by some other extension or localconf.php
66 if (!is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['scheduler']['tasks']['tx_scheduler_TableGarbageCollection']['options'])) {
67 $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['scheduler']['tasks']['tx_scheduler_TableGarbageCollection']['options'] = array();
68 }
69 if (!is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['scheduler']['tasks']['tx_scheduler_TableGarbageCollection']['options']['tables'])) {
70 $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['scheduler']['tasks']['tx_scheduler_TableGarbageCollection']['options']['tables'] = array();
71 }
72 // Register sys_log and sys_history table in table garbage collection task
73 if (!is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['scheduler']['tasks']['tx_scheduler_TableGarbageCollection']['options']['tables']['sys_log'])) {
74 $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['scheduler']['tasks']['tx_scheduler_TableGarbageCollection']['options']['tables']['sys_log'] = array(
75 'dateField' => 'tstamp',
76 'expirePeriod' => 180,
77 );
78 }
79
80 if (!is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['scheduler']['tasks']['tx_scheduler_TableGarbageCollection']['options']['tables']['sys_history'])) {
81 $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['scheduler']['tasks']['tx_scheduler_TableGarbageCollection']['options']['tables']['sys_history'] = array(
82 'dateField' => 'tstamp',
83 'expirePeriod' => 30,
84 );
85 }
86
87 ?>