From 39c372fe045331f309e7dc7addd5f07e7583bdd7 Mon Sep 17 00:00:00 2001 From: jengo Date: Sat, 4 Nov 2000 04:50:02 +0000 Subject: [PATCH] Tring to fix delete from config errors, add some code to limit the error reporting --- setup/config.php | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/setup/config.php b/setup/config.php index 6e181dfd0c..785da6b0f9 100644 --- a/setup/config.php +++ b/setup/config.php @@ -38,26 +38,26 @@ echo "
phpGroupWare version " . $phpgw_info["server"]["version"] . " setup

"; if ($submit) { - $db->query("delete from config"); + @$db->query("delete from config"); while ($newsetting = each($newsettings)) { - if($newsetting[0] == "nntp_server") { - $db->query("select config_value FROM config WHERE config_name='nntp_server'"); - if($db->num_rows()) { - $db->next_record(); - if($db->f("config_value") <> $newsetting[1]) { - $db->query("DELETE FROM newsgroups"); - $db->query("DELETE FROM users_newsgroups"); - } - } - } - $db->query("insert into config (config_name, config_value) values ('" . addslashes($newsetting[0]) - . "','" . addslashes($newsetting[1]) . "')"); + if ($newsetting[0] == "nntp_server") { + $db->query("select config_value FROM config WHERE config_name='nntp_server'"); + if ($db->num_rows()) { + $db->next_record(); + if ($db->f("config_value") <> $newsetting[1]) { + $db->query("DELETE FROM newsgroups"); + $db->query("DELETE FROM users_newsgroups"); + } + } + } + $db->query("insert into config (config_name, config_value) values ('" . addslashes($newsetting[0]) + . "','" . addslashes($newsetting[1]) . "')"); } echo "

Your config has been updated
Click here to login"; } - $db->query("select * from config"); - while ($db->next_record()) { + @$db->query("select * from config"); + while (@$db->next_record()) { $current_config[$db->f("config_name")] = $db->f("config_value"); } ?>