fix reset to default for mysql

This commit is contained in:
Andrew Dolgov 2005-11-18 10:21:41 +01:00
parent f6f321982f
commit e1aa0559c7
1 changed files with 10 additions and 4 deletions

View File

@ -1616,10 +1616,16 @@
if (WEB_DEMO_MODE) return;
db_query($link,"UPDATE ttrss_user_prefs
SET value = ttrss_prefs.def_value
WHERE owner_uid = '".$_SESSION["uid"]."' AND
ttrss_prefs.pref_name = ttrss_user_prefs.pref_name");
if (DB_TYPE == "pgsql") {
db_query($link,"UPDATE ttrss_user_prefs
SET value = ttrss_prefs.def_value
WHERE owner_uid = '".$_SESSION["uid"]."' AND
ttrss_prefs.pref_name = ttrss_user_prefs.pref_name");
} else {
db_query($link, "DELETE FROM ttrss_user_prefs
WHERE owner_uid = ".$_SESSION["uid"]);
initialize_user_prefs($link, $_SESSION["uid"]);
}
header("Location: prefs.php");