Skip to content

Commit

Permalink
Dev Patch commit to port to 1.91 - please ignore - will be reverted i…
Browse files Browse the repository at this point in the history
…n the next rev

git-svn-id: file:///Users/Shitiz/Downloads/lssvn/source/limesurvey@9210 b72ed6b6-b9f8-46b5-92b4-906544132732
  • Loading branch information
c-schmitz committed Oct 11, 2010
1 parent 899412a commit 82afe29
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
4 changes: 2 additions & 2 deletions common.php
Expand Up @@ -3546,15 +3546,15 @@ function questionAttributes($returnByName=false)
$qattributes["dropdown_dates_year_min"]=array(
"types"=>"D",
'category'=>$clang->gT('Display'),
'sortorder'=>100,
'sortorder'=>110,
'inputtype'=>'text',
"help"=>$clang->gT('Minimum year value in calendar'),
"caption"=>$clang->gT('Minimum year'));

$qattributes["dropdown_dates_year_max"]=array(
"types"=>"D",
'category'=>$clang->gT('Display'),
'sortorder'=>100,
'sortorder'=>111,
'inputtype'=>'text',
"help"=>$clang->gT('Maximum year value for calendar'),
"caption"=>$clang->gT('Maximum year'));
Expand Down
13 changes: 12 additions & 1 deletion qanda.php
Expand Up @@ -1640,7 +1640,18 @@ function do_date($ia)
$yearmax = 2020;
}

for ($i=$yearmax; $i>=$yearmin; $i--) {
if ($yearmin > $yearmax)
{
$step = 1;
$reverse = true;
}
else
{
$step = -1;
$reverse = false;
}

for ($i=$yearmax; ($reverse? $i<=$yearmin: $i>=$yearmin); $i+=$step) {
if ($i == $currentyear)
{
$i_date_selected = SELECTED;
Expand Down

0 comments on commit 82afe29

Please sign in to comment.