getYears: offered range to select from has to include already selected year

This commit is contained in:
Ralf Becker 2001-06-04 14:13:32 +00:00
parent 4e4341d091
commit a68a536616

View File

@ -133,11 +133,13 @@
{ {
$startYear = date('Y') - 2; $startYear = date('Y') - 2;
} }
if ($selected && $startYear > $selected) $startYear = $selected;
if (!$endyear) if (!$endyear)
{ {
$endyear = date('Y') + 5; $endyear = date('Y') + 5;
} }
if ($selected && $endYear < $selected) $endYear = $selected;
$out = '<select name="'.$name.'">'."\n"; $out = '<select name="'.$name.'">'."\n";