[kronolith] RELENG: patch to fix weird dates when adding event

Leena Heino Leena.Heino at uta.fi
Sat Jan 25 11:13:45 PST 2003


It seems that when RELENG version of Event.php was modified to not use
HTML_Select some $sel were left unset. It seems that when $sel is unset it
$sel default value was the first value of array. Because of this bug
start_year and start_month used wrong default values in html() function.

Here's the patch to RELENG:
--- kronolith/lib/Event.php.orig	Thu Jan  9 15:36:37 2003
+++ kronolith/lib/Event.php	Sat Jan 25 10:54:56 2003
@@ -477,6 +477,7 @@

         case 'start_year':
             $start_year_match = $this->getStartDate('Y');
+            $sel = $this->getStartDate('Y');
             for ($i = -1; $i < 6; $i++) {
                 $yr = date('Y') + $i;
                 $options[$yr] = $yr;
@@ -486,6 +487,7 @@

         case 'start_month':
             $start_month_match = $this->getStartDate('n');
+            $sel = $this->getStartDate('n');
             for ($i = 1; $i < 13; $i++) {
                 $options[$i] = strftime('%b', mktime(1, 1, 1, $i, 1));
             }

-- 
  -- Leena Heino (liinu at uta.fi)


More information about the kronolith mailing list