diff --git a/config/rollover.php b/config/rollover.php index 0292901..1173152 100644 --- a/config/rollover.php +++ b/config/rollover.php @@ -56,8 +56,8 @@ if($_POST['action']=="rollover" && $_POST['nextfairyear']) { - $newfairyear=$_POST['nextfairyear']; - $currentfairyear=$config['FAIRYEAR']; + $newfairyear=intval($_POST['nextfairyear']); + $currentfairyear=intval($config['FAIRYEAR']); if($newfairyear<$currentfairyear) echo error(i18n("You cannot roll backwards in years!")); diff --git a/config_editor.inc.php b/config_editor.inc.php index 1e71c18..5a20196 100644 --- a/config_editor.inc.php +++ b/config_editor.inc.php @@ -93,7 +93,7 @@ function config_update_variables($fairyear=NULL, $lastfairyear=NULL) WHERE config.var='$var' AND (config.year='$lastfairyear' OR config.year='-1') - ORDER BY config.year"; + ORDER BY config.year DESC"; $r2 = mysql_query($q); if(mysql_num_rows($r2) < 1) { /* Uhoh, this shouldn't happen */