[BUGFIX] Remove cache_pages from table garbage collection task
[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 recycler directory cleanup task. Windows is not supported
41 // because "filectime" does not change after moving a file
42 if (TYPO3_OS != 'WIN') {
43 $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['scheduler']['tasks']['tx_scheduler_RecyclerGarbageCollection'] = array(
44 'extension' => $_EXTKEY,
45 'title' => 'LLL:EXT:' . $_EXTKEY . '/locallang.xml:recyclerGarbageCollection.name',
46 'description' => 'LLL:EXT:' . $_EXTKEY . '/locallang.xml:recyclerGarbageCollection.description',
47 'additionalFields' => 'tx_scheduler_RecyclerGarbageCollection_AdditionalFieldProvider',
48 );
49 }
50
51 // Add table garbage collection task
52 $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['scheduler']['tasks']['tx_scheduler_TableGarbageCollection'] = array(
53 'extension' => $_EXTKEY,
54 'title' => 'LLL:EXT:' . $_EXTKEY . '/locallang.xml:tableGarbageCollection.name',
55 'description' => 'LLL:EXT:' . $_EXTKEY . '/locallang.xml:tableGarbageCollection.description',
56 'additionalFields' => 'tx_scheduler_TableGarbageCollection_AdditionalFieldProvider',
57 );
58 // Initialize option array of table garbage collection task if not already done by some other extension or localconf.php
59 if (!is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['scheduler']['tasks']['tx_scheduler_TableGarbageCollection']['options'])) {
60 $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['scheduler']['tasks']['tx_scheduler_TableGarbageCollection']['options'] = array();
61 }
62 if (!is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['scheduler']['tasks']['tx_scheduler_TableGarbageCollection']['options']['tables'])) {
63 $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['scheduler']['tasks']['tx_scheduler_TableGarbageCollection']['options']['tables'] = array();
64 }
65 // Register sys_log table in table garbage collection task
66 if (!is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['scheduler']['tasks']['tx_scheduler_TableGarbageCollection']['options']['tables']['sys_log'])) {
67 $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['scheduler']['tasks']['tx_scheduler_TableGarbageCollection']['options']['tables']['sys_log'] = array(
68 'dateField' => 'tstamp',
69 'expirePeriod' => 180,
70 );
71 }
72 ?>