TYPO3 CMS  TYPO3_6-2
ext_localconf.php
Go to the documentation of this file.
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.xlf:testTask.name',
18  'description' => 'LLL:EXT:' . $_EXTKEY . '/locallang.xlf: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.xlf:sleepTask.name',
24  'description' => 'LLL:EXT:' . $_EXTKEY . '/locallang.xlf: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.xlf:cachingFrameworkGarbageCollection.name',
32  'description' => 'LLL:EXT:' . $_EXTKEY . '/locallang.xlf: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.xlf:fileIndexing.name',
39  'description' => 'LLL:EXT:' . $_EXTKEY . '/locallang.xlf:fileIndexing.description'
40 );
41 
42 // Add task to index file in a storage
43 $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['scheduler']['tasks']['TYPO3\\CMS\\Scheduler\\Task\\FileStorageIndexingTask'] = array(
44  'extension' => $_EXTKEY,
45  'title' => 'LLL:EXT:' . $_EXTKEY . '/locallang.xlf:fileStorageIndexing.name',
46  'description' => 'LLL:EXT:' . $_EXTKEY . '/locallang.xlf:fileStorageIndexing.description',
47  'additionalFields' => 'TYPO3\\CMS\\Scheduler\\Task\\FileStorageIndexingAdditionalFieldProvider'
48 );
49 
50 // Add task for extracting metadata from files in a storage
51 $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['scheduler']['tasks']['TYPO3\\CMS\\Scheduler\\Task\\FileStorageExtractionTask'] = array(
52  'extension' => $_EXTKEY,
53  'title' => 'LLL:EXT:' . $_EXTKEY . '/locallang.xlf:fileStorageExtraction.name',
54  'description' => 'LLL:EXT:' . $_EXTKEY . '/locallang.xlf:fileStorageExtraction.description',
55  'additionalFields' => 'TYPO3\\CMS\\Scheduler\\Task\\FileStorageExtractionAdditionalFieldProvider'
56 
57 );
58 
59 // Add recycler directory cleanup task. Windows is not supported
60 // because "filectime" does not change after moving a file
61 if (TYPO3_OS !== 'WIN') {
62  $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['scheduler']['tasks']['TYPO3\\CMS\\Scheduler\\Task\\RecyclerGarbageCollectionTask'] = array(
63  'extension' => $_EXTKEY,
64  'title' => 'LLL:EXT:' . $_EXTKEY . '/locallang.xlf:recyclerGarbageCollection.name',
65  'description' => 'LLL:EXT:' . $_EXTKEY . '/locallang.xlf:recyclerGarbageCollection.description',
66  'additionalFields' => 'TYPO3\\CMS\\Scheduler\\Task\\RecyclerGarbageCollectionAdditionalFieldProvider'
67  );
68 }
69 
70 // Save any previous option array for table garbage collection task
71 // to temporary variable so it can be pre-populated by other
72 // extensions and LocalConfiguration/AdditionalConfiguration
74 if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['scheduler']['tasks']['TYPO3\\CMS\\Scheduler\\Task\\TableGarbageCollectionTask']['options'])) {
75  $garbageCollectionTaskOptions = $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['scheduler']['tasks']['TYPO3\\CMS\\Scheduler\\Task\\TableGarbageCollectionTask']['options'];
76 }
77 // Initialize tables sub-array if not set already
78 if (!is_array($garbageCollectionTaskOptions['tables'])) {
79  $garbageCollectionTaskOptions['tables'] = array();
80 }
81 // Add table garbage collection task
82 $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['scheduler']['tasks']['TYPO3\\CMS\\Scheduler\\Task\\TableGarbageCollectionTask'] = array(
83  'extension' => $_EXTKEY,
84  'title' => 'LLL:EXT:' . $_EXTKEY . '/locallang.xlf:tableGarbageCollection.name',
85  'description' => 'LLL:EXT:' . $_EXTKEY . '/locallang.xlf:tableGarbageCollection.description',
86  'additionalFields' => 'TYPO3\\CMS\\Scheduler\\Task\\TableGarbageCollectionAdditionalFieldProvider',
88 );
90 
91 // Register sys_log and sys_history table in table garbage collection task
92 if (!is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['scheduler']['tasks']['TYPO3\\CMS\\Scheduler\\Task\\TableGarbageCollectionTask']['options']['tables']['sys_log'])) {
93  $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['scheduler']['tasks']['TYPO3\\CMS\\Scheduler\\Task\\TableGarbageCollectionTask']['options']['tables']['sys_log'] = array(
94  'dateField' => 'tstamp',
95  'expirePeriod' => 180
96  );
97 }
98 if (!is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['scheduler']['tasks']['TYPO3\\CMS\\Scheduler\\Task\\TableGarbageCollectionTask']['options']['tables']['sys_history'])) {
99  $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['scheduler']['tasks']['TYPO3\\CMS\\Scheduler\\Task\\TableGarbageCollectionTask']['options']['tables']['sys_history'] = array(
100  'dateField' => 'tstamp',
101  'expirePeriod' => 30
102  );
103 }
if(TYPO3_OS !=='WIN') $garbageCollectionTaskOptions
die
Definition: index.php:6
$extConf
if(!defined('TYPO3_MODE')) $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_userauth.php']['logoff_pre_processing'][]