diff --git a/classes/controller/admin/wages.php b/classes/controller/admin/wages.php index 4d86d80..fa66dc5 100644 --- a/classes/controller/admin/wages.php +++ b/classes/controller/admin/wages.php @@ -23,8 +23,11 @@ public function action_index() } $periods = array(); - while ($year <= $current_year && $month <= $current_month) + while (1 == 1) { + if ($year > $current_year) break; + elseif ($year == $current_year && $month > $current_month) break; + $periods[$year.$month.'option'] = array( '@value' => $year.'-'.$month, $year.' '.date('F', mktime(0,0,0,$month,1)) @@ -37,6 +40,7 @@ public function action_index() $month = 1; } } + xml::to_XML($periods, $this->xml_content->appendChild($this->dom->createElement('periods'))); if ( ! isset($_GET['period']) || ! preg_match('/^\d{4}-\d{1,2}$/', $_GET['period']))