forked from science-ation/science-ation
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:
parent
599f740cd3
commit
288dd58c9c
@ -27,6 +27,17 @@
|
|||||||
send_header("Configuration - Variables");
|
send_header("Configuration - Variables");
|
||||||
echo "<a href=\"index.php\"><< ".i18n("Back to Configuration")."</a><br />";
|
echo "<a href=\"index.php\"><< ".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['action']=="save")
|
||||||
{
|
{
|
||||||
if($_POST['specialconfig'])
|
if($_POST['specialconfig'])
|
||||||
|
Loading…
x
Reference in New Issue
Block a user