Added feature #13296: Scheduler: Add option to disable the sample tasks
authorFrancois Suter <francois.suter@typo3.org>
Tue, 6 Apr 2010 18:57:45 +0000 (18:57 +0000)
committerFrancois Suter <francois.suter@typo3.org>
Tue, 6 Apr 2010 18:57:45 +0000 (18:57 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@7251 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
typo3/sysext/scheduler/doc/manual.sxw
typo3/sysext/scheduler/ext_conf_template.txt
typo3/sysext/scheduler/ext_localconf.php

index 335a069..87caf69 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,7 @@
 2010-04-06  Francois Suter  <francois@typo3.org>
 
        * Added feature #11316: Add a "No Frame" option [css styled content] (thanks to Susanne Moog)
+       * Added feature #13296: Scheduler: Add option to disable the sample tasks
 
 2010-04-06  Dmitry Dulepov  <dmitry.dulepov@gmail.com>
 
index ef2a839..43f0a2f 100644 (file)
Binary files a/typo3/sysext/scheduler/doc/manual.sxw and b/typo3/sysext/scheduler/doc/manual.sxw differ
index 508a551..e4c3776 100644 (file)
@@ -3,3 +3,6 @@ maxLifetime = 1440
 
 # cat=basic//; type=boolean; label=Enable logging: When turned on, every start and end of every executed task is logged into TYPO3's BE Log. While this is convenient when setting things up, it may clutter the BE Log in the long run.
 enableBELog = 1
+
+# cat=basic//; type=boolean; label=Enable sample tasks: When turned on, you can use the sample, test tasks provided by the scheduler. Before turning this off, make sure you don't have any of those sample tasks currently scheduled. You will also need to clear the configuration cache.
+showSampleTasks = 1
index f0e8fe6..81fc03b 100644 (file)
@@ -10,17 +10,23 @@ $TYPO3_CONF_VARS['SC_OPTIONS']['GLOBAL']['cliKeys'][$_EXTKEY] = array(
        'EXT:' . $_EXTKEY . '/cli/scheduler_cli_dispatch.php', '_CLI_scheduler'
 );
 
-       // Register information for the test and sleep tasks
-$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['scheduler']['tasks']['tx_scheduler_TestTask'] = array(
-       'extension'        => $_EXTKEY,
-       'title'            => 'LLL:EXT:' . $_EXTKEY . '/locallang.xml:testTask.name',
-       'description'      => 'LLL:EXT:' . $_EXTKEY . '/locallang.xml:testTask.description',
-       'additionalFields' => 'tx_scheduler_TestTask_AdditionalFieldProvider'
-);
-$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['scheduler']['tasks']['tx_scheduler_SleepTask'] = array(
-       'extension'        => $_EXTKEY,
-       'title'            => 'LLL:EXT:' . $_EXTKEY . '/locallang.xml:sleepTask.name',
-       'description'      => 'LLL:EXT:' . $_EXTKEY . '/locallang.xml:sleepTask.description',
-       'additionalFields' => 'tx_scheduler_SleepTask_AdditionalFieldProvider'
-);
-?>
\ No newline at end of file
+       // Get the extensions's configuration
+$extConf = unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['scheduler']);
+
+       // If sample tasks should be shown,
+       // register information for the test and sleep tasks
+if (!empty($extConf['showSampleTasks'])) {
+       $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['scheduler']['tasks']['tx_scheduler_TestTask'] = array(
+               'extension'        => $_EXTKEY,
+               'title'            => 'LLL:EXT:' . $_EXTKEY . '/locallang.xml:testTask.name',
+               'description'      => 'LLL:EXT:' . $_EXTKEY . '/locallang.xml:testTask.description',
+               'additionalFields' => 'tx_scheduler_TestTask_AdditionalFieldProvider'
+       );
+       $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['scheduler']['tasks']['tx_scheduler_SleepTask'] = array(
+               'extension'        => $_EXTKEY,
+               'title'            => 'LLL:EXT:' . $_EXTKEY . '/locallang.xml:sleepTask.name',
+               'description'      => 'LLL:EXT:' . $_EXTKEY . '/locallang.xml:sleepTask.description',
+               'additionalFields' => 'tx_scheduler_SleepTask_AdditionalFieldProvider'
+       );
+}
+?>