Skip to content

Commit 5d47b62

Browse files
committed
Fixed bug with years and month selector in wages
1 parent c00cbb7 commit 5d47b62

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

classes/controller/admin/wages.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,11 @@ public function action_index()
2323
}
2424

2525
$periods = array();
26-
while ($year <= $current_year && $month <= $current_month)
26+
while (1 == 1)
2727
{
28+
if ($year > $current_year) break;
29+
elseif ($year == $current_year && $month > $current_month) break;
30+
2831
$periods[$year.$month.'option'] = array(
2932
'@value' => $year.'-'.$month,
3033
$year.' '.date('F', mktime(0,0,0,$month,1))
@@ -37,6 +40,7 @@ public function action_index()
3740
$month = 1;
3841
}
3942
}
43+
4044
xml::to_XML($periods, $this->xml_content->appendChild($this->dom->createElement('periods')));
4145

4246
if ( ! isset($_GET['period']) || ! preg_match('/^\d{4}-\d{1,2}$/', $_GET['period']))

0 commit comments

Comments
 (0)