disable config updates if WEB_DEMO_MODE is on

This commit is contained in:
Andrew Dolgov 2005-11-17 08:26:33 +01:00
parent ab49d368c1
commit 01d68cf94f
1 changed files with 4 additions and 0 deletions

View File

@ -1510,6 +1510,8 @@
if ($subop == "Save configuration") { if ($subop == "Save configuration") {
if (WEB_DEMO_MODE) return;
foreach (array_keys($_POST) as $pref_name) { foreach (array_keys($_POST) as $pref_name) {
$pref_name = db_escape_string($pref_name); $pref_name = db_escape_string($pref_name);
@ -1562,6 +1564,8 @@
} else if ($subop == "Reset to defaults") { } else if ($subop == "Reset to defaults") {
if (WEB_DEMO_MODE) return;
db_query($link, "UPDATE ttrss_prefs SET value = def_value"); db_query($link, "UPDATE ttrss_prefs SET value = def_value");
header("Location: prefs.php"); header("Location: prefs.php");