[BUGFIX] Release scheduler from classname field
[Packages/TYPO3.CMS.git] / typo3 / sysext / scheduler / ext_localconf.php
1 <?php
2 if (!defined('TYPO3_MODE')) {
3 die('Access denied.');
4 }
5 // Register the Scheduler as a possible key for CLI calls
6 $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['GLOBAL']['cliKeys'][$_EXTKEY] = array(
7 'EXT:' . $_EXTKEY . '/cli/scheduler_cli_dispatch.php',
8 '_CLI_scheduler'
9 );
10 // Get the extensions's configuration
11 $extConf = unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['scheduler']);
12 // If sample tasks should be shown,
13 // register information for the test and sleep tasks
14 if (!empty($extConf['showSampleTasks'])) {
15 $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['scheduler']['tasks']['TYPO3\\CMS\\Scheduler\\Example\\TestTask'] = array(
16 'extension' => $_EXTKEY,
17 'title' => 'LLL:EXT:' . $_EXTKEY . '/locallang.xml:testTask.name',
18 'description' => 'LLL:EXT:' . $_EXTKEY . '/locallang.xml:testTask.description',
19 'additionalFields' => 'TYPO3\\CMS\\Scheduler\\Example\\TestTaskAdditionalFieldProvider'
20 );
21 $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['scheduler']['tasks']['TYPO3\\CMS\\Scheduler\\Example\\SleepTask'] = array(
22 'extension' => $_EXTKEY,
23 'title' => 'LLL:EXT:' . $_EXTKEY . '/locallang.xml:sleepTask.name',
24 'description' => 'LLL:EXT:' . $_EXTKEY . '/locallang.xml:sleepTask.description',
25 'additionalFields' => 'TYPO3\\CMS\\Scheduler\\Example\\SleepTaskAdditionalFieldProvider'
26 );
27 }
28 // Add caching framework garbage collection task
29 $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['scheduler']['tasks']['TYPO3\\CMS\\Scheduler\\Task\\CachingFrameworkGarbageCollectionTask'] = array(
30 'extension' => $_EXTKEY,
31 'title' => 'LLL:EXT:' . $_EXTKEY . '/locallang.xml:cachingFrameworkGarbageCollection.name',
32 'description' => 'LLL:EXT:' . $_EXTKEY . '/locallang.xml:cachingFrameworkGarbageCollection.description',
33 'additionalFields' => 'TYPO3\\CMS\\Scheduler\\Task\\CachingFrameworkGarbageCollectionAdditionalFieldProvider'
34 );
35 // Add file indexing task
36 $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['scheduler']['tasks']['TYPO3\\CMS\\Scheduler\\Task\\FileIndexingTask'] = array(
37 'extension' => $_EXTKEY,
38 'title' => 'LLL:EXT:' . $_EXTKEY . '/locallang.xml:fileIndexing.name',
39 'description' => 'LLL:EXT:' . $_EXTKEY . '/locallang.xml:fileIndexing.description'
40 );
41 // Add recycler directory cleanup task. Windows is not supported
42 // because "filectime" does not change after moving a file
43 if (TYPO3_OS != 'WIN') {
44 $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['scheduler']['tasks']['TYPO3\\CMS\\Scheduler\\Task\\RecyclerGarbageCollectionTask'] = array(
45 'extension' => $_EXTKEY,
46 'title' => 'LLL:EXT:' . $_EXTKEY . '/locallang.xml:recyclerGarbageCollection.name',
47 'description' => 'LLL:EXT:' . $_EXTKEY . '/locallang.xml:recyclerGarbageCollection.description',
48 'additionalFields' => 'TYPO3\\CMS\\Scheduler\\Task\\RecyclerGarbageCollectionAdditionalFieldProvider'
49 );
50 }
51 // Add table garbage collection task
52 $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['scheduler']['tasks']['TYPO3\\CMS\\Scheduler\\Task\\TableGarbageCollectionTask'] = array(
53 'extension' => $_EXTKEY,
54 'title' => 'LLL:EXT:' . $_EXTKEY . '/locallang.xml:tableGarbageCollection.name',
55 'description' => 'LLL:EXT:' . $_EXTKEY . '/locallang.xml:tableGarbageCollection.description',
56 'additionalFields' => 'TYPO3\\CMS\\Scheduler\\Task\\TableGarbageCollectionAdditionalFieldProvider'
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']['TYPO3\\CMS\\Scheduler\\Task\\TableGarbageCollectionTask']['options'])) {
60 $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['scheduler']['tasks']['TYPO3\\CMS\\Scheduler\\Task\\TableGarbageCollectionTask']['options'] = array();
61 }
62 if (!is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['scheduler']['tasks']['TYPO3\\CMS\\Scheduler\\Task\\TableGarbageCollectionTask']['options']['tables'])) {
63 $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['scheduler']['tasks']['TYPO3\\CMS\\Scheduler\\Task\\TableGarbageCollectionTask']['options']['tables'] = array();
64 }
65 // Register sys_log and sys_history table in table garbage collection task
66 if (!is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['scheduler']['tasks']['TYPO3\\CMS\\Scheduler\\Task\\TableGarbageCollectionTask']['options']['tables']['sys_log'])) {
67 $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['scheduler']['tasks']['TYPO3\\CMS\\Scheduler\\Task\\TableGarbageCollectionTask']['options']['tables']['sys_log'] = array(
68 'dateField' => 'tstamp',
69 'expirePeriod' => 180
70 );
71 }
72 if (!is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['scheduler']['tasks']['TYPO3\\CMS\\Scheduler\\Task\\TableGarbageCollectionTask']['options']['tables']['sys_history'])) {
73 $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['scheduler']['tasks']['TYPO3\\CMS\\Scheduler\\Task\\TableGarbageCollectionTask']['options']['tables']['sys_history'] = array(
74 'dateField' => 'tstamp',
75 'expirePeriod' => 30
76 );
77 }
78 ?>