[sfiab-commits] r285 - trunk/config
Brought to you by:
sfiab
From: <ja...@li...> - 2005-11-24 20:12:39
|
Author: james Date: 2005-11-24 15:12:06 -0500 (Thu, 24 Nov 2005) New Revision: 285 Modified: trunk/config/variables.php Log: 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. Modified: trunk/config/variables.php =================================================================== --- trunk/config/variables.php 2005-11-24 19:06:38 UTC (rev 284) +++ trunk/config/variables.php 2005-11-24 20:12:06 UTC (rev 285) @@ -27,6 +27,17 @@ send_header("Configuration - Variables"); 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['specialconfig']) |