forked from science-ation/science-ation
- Force the config page to reload when saved, so changes in $config are
reloaded and thus immediately displayed.
This commit is contained in:
parent
0f763de1ac
commit
65ba63bd81
@ -26,11 +26,6 @@
|
|||||||
require_once("../user.inc.php");
|
require_once("../user.inc.php");
|
||||||
require_once("../config_editor.inc.php");
|
require_once("../config_editor.inc.php");
|
||||||
user_auth_required('committee', 'config');
|
user_auth_required('committee', 'config');
|
||||||
send_header("Configuration Variables",
|
|
||||||
array('Committee Main' => 'committee_main.php',
|
|
||||||
'SFIAB Configuration' => 'config/index.php')
|
|
||||||
,"configuration_variables"
|
|
||||||
);
|
|
||||||
|
|
||||||
$q=mysql_query("SELECT * FROM config WHERE year='-1'");
|
$q=mysql_query("SELECT * FROM config WHERE year='-1'");
|
||||||
while($r=mysql_fetch_object($q))
|
while($r=mysql_fetch_object($q))
|
||||||
@ -56,7 +51,7 @@
|
|||||||
mysql_query("UPDATE config SET val='".mysql_escape_string(stripslashes($val))."' WHERE year='0' AND var='$key'");
|
mysql_query("UPDATE config SET val='".mysql_escape_string(stripslashes($val))."' WHERE year='0' AND var='$key'");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
echo happy(i18n("Configuration successfully saved"));
|
message_push(happy(i18n("Configuration successfully saved")));
|
||||||
}
|
}
|
||||||
|
|
||||||
//get the category, and if nothing is chosen, default to Global
|
//get the category, and if nothing is chosen, default to Global
|
||||||
@ -64,6 +59,19 @@
|
|||||||
else if($_POST['category']) $category=$_POST['category'];
|
else if($_POST['category']) $category=$_POST['category'];
|
||||||
else $category="Global";
|
else $category="Global";
|
||||||
|
|
||||||
|
$action = config_editor_handle_actions($category, $config['FAIRYEAR'], "var");
|
||||||
|
if($action == 'update') {
|
||||||
|
header("Location: variables.php?category=$category");
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
send_header("Configuration Variables",
|
||||||
|
array('Committee Main' => 'committee_main.php',
|
||||||
|
'SFIAB Configuration' => 'config/index.php')
|
||||||
|
,"configuration_variables"
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
$q=mysql_query("SELECT DISTINCT(category) AS cat FROM config ORDER BY cat");
|
$q=mysql_query("SELECT DISTINCT(category) AS cat FROM config ORDER BY cat");
|
||||||
echo "\n<table valign=\"top\" cellspacing=0 cellpadding=5 border=0>";
|
echo "\n<table valign=\"top\" cellspacing=0 cellpadding=5 border=0>";
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user