Skip to content

Commit

Permalink
Fixed bug with years and month selector in wages
Browse files Browse the repository at this point in the history
  • Loading branch information
lillem4n committed Jan 11, 2012
1 parent c00cbb7 commit 5d47b62
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion classes/controller/admin/wages.php
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand All @@ -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']))
Expand Down

0 comments on commit 5d47b62

Please sign in to comment.