Fixed bug #16470: Scheduler fails to calculateNextValue a turn of the year
authorFrancois Suter <francois.suter@typo3.org>
Fri, 17 Dec 2010 14:02:17 +0000 (14:02 +0000)
committerFrancois Suter <francois.suter@typo3.org>
Fri, 17 Dec 2010 14:02:17 +0000 (14:02 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/branches/TYPO3_4-3@9826 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
typo3/sysext/scheduler/class.tx_scheduler_croncmd.php

index 657fd68..e39fffe 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2010-12-17  Francois Suter  <francois.suter@typo3.org>
+
+       * Fixed bug #16470: Scheduler fails to calculateNextValue a turn of the year (thanks to Tobias Hövelborn and Christian Kuhn)
+
 2010-12-16  Oliver Hader  <oliver.hader@typo3.org>
 
        * Release of TYPO3 4.3.9
index dbf6868..22767fe 100644 (file)
@@ -139,8 +139,8 @@ class tx_scheduler_CronCmd {
                                                        if ($increased_value !== false) {
                                                                $this->values[$i] = $increased_value;
 
-                                                                       // Update day list if month was changed
-                                                               if ($i == 3) {
+                                                                       // Update day list if month or year was changed
+                                                               if ($i >= 3) {
                                                                        $this->valid_values[2] = $this->getDayList($this->values[3], $this->values[4]);
 
                                                                                // Check if day had already a valid start value, if not set a new one
@@ -152,11 +152,6 @@ class tx_scheduler_CronCmd {
                                                                break;
                                                        } else {
                                                                $this->values[$i] = $this->valid_values[$i][0];
-
-                                                                       // Update day list if month was changed
-                                                               if ($i == 3) {
-                                                                       $this->valid_values[2] = $this->getDayList($this->values[3], $this->values[4]+1);
-                                                               }
                                                        }
                                                }
                                        }