Make sure we always have all of our configuration variables defined. If a new one is added as a default with year -1, it needs to be automatically created for the current FAIRYEAR as well.

This commit is contained in:
james 2005-11-24 20:12:06 +00:00
parent 599f740cd3
commit 288dd58c9c

View File

@ -27,6 +27,17 @@
send_header("Configuration - Variables");
echo "<a href=\"index.php\">&lt;&lt; ".i18n("Back to Configuration")."</a><br />";
$q=mysql_query("SELECT * FROM config WHERE year='-1'");
while($r=mysql_fetch_object($q))
{
mysql_query("INSERT INTO config (var,val,description,year) VALUES (
'".mysql_escape_string($r->var)."',
'".mysql_escape_string($r->val)."',
'".mysql_escape_string($r->description)."',
'".$config['FAIRYEAR']."')");
}
if($_POST['action']=="save")
{
if($_POST['specialconfig'])