[BUGFIX] Fix some broken classname substitutions in scheduler
authorThomas Maroschik <tmaroschik@dfau.de>
Sun, 26 Aug 2012 00:11:52 +0000 (02:11 +0200)
committerThomas Maroschik <tmaroschik@dfau.de>
Sun, 26 Aug 2012 00:13:24 +0000 (02:13 +0200)
Change-Id: I10048b23ba6a03542aa97ca5c27091c005a38ac6
Fixes: #40220
Relates: 40095
Releases: 6.0
Reviewed-on: http://review.typo3.org/14102
Reviewed-by: Thomas Maroschik
Tested-by: Thomas Maroschik
typo3/sysext/scheduler/Classes/FailedExecutionException.php
typo3/sysext/scheduler/Classes/Scheduler.php

index a2c12fd..d0f0dd4 100644 (file)
@@ -30,7 +30,7 @@ namespace TYPO3\CMS\Scheduler;
  * @package TYPO3
  * @subpackage scheduler
  */
-class FailedExecutionException extends RuntimeException {
+class FailedExecutionException extends \RuntimeException {
 
 
 }
index 9edc7d7..d6939dc 100644 (file)
@@ -74,7 +74,7 @@ class Scheduler implements \TYPO3\CMS\Core\SingletonInterface {
                                'disable' => $task->isDisabled(),
                                'serialized_task_object' => 'RESERVED'
                        );
-                       $result = $GLOBALS['TYPO3_DB']->exec_INSERTquery('TYPO3\\CMS\\Scheduler\\Scheduler_task', $fields);
+                       $result = $GLOBALS['TYPO3_DB']->exec_INSERTquery('tx_scheduler_task', $fields);
                        if ($result) {
                                $task->setTaskUid($GLOBALS['TYPO3_DB']->sql_insert_id());
                                $task->save();
@@ -257,7 +257,6 @@ class Scheduler implements \TYPO3\CMS\Core\SingletonInterface {
         * @return \TYPO3\CMS\Scheduler\Task The fetched task object
         */
        public function fetchTask($uid = 0) {
-               $whereClause = '';
                // Define where clause
                // If no uid is given, take any non-disabled task which has a next execution time in the past
                if (empty($uid)) {
@@ -337,7 +336,7 @@ class Scheduler implements \TYPO3\CMS\Core\SingletonInterface {
                $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('serialized_task_object', 'tx_scheduler_task', $whereClause);
                if ($res) {
                        while ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {
-                               /** @var $task tx_scheduler_task */
+                               /** @var $task Task */
                                $task = unserialize($row['serialized_task_object']);
                                // Add the task to the list only if it is valid
                                if ($this->isValidTaskObject($task)) {