when changing nntp servers, deletes newsgroups and users_newsgroups

This commit is contained in:
skeeter 2000-10-24 01:13:04 +00:00
parent e9fa1314a9
commit 624c91e070
2 changed files with 11 additions and 0 deletions

View File

@ -4,6 +4,7 @@
- Fixed a number of preferences bugs on the main screen.
- Fixed E-Mail sigs not being added.
- Moved E-Mail preferences into its own section.
- When changing NNTP servers, now deletes newsgroups and users_newsgroups.
[0.9.2] - Fixed sorting bug in currentusers.php
- Cleaned up error reporting and form in newaccount.php

View File

@ -40,6 +40,16 @@
if ($submit) {
$db->query("delete from config");
while ($newsetting = each($newsettings)) {
if($newsetting[0] == "nntp_server") {
$db->query("select nntp_server from config");
if($db->num_rows()) {
$db->next_record();
if($db->f("nntp_server") <> $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]) . "')");
}