From: Andrew Dolgov Date: Fri, 18 Nov 2005 09:21:41 +0000 (+0100) Subject: fix reset to default for mysql X-Git-Tag: schema_feature_freeze_for_1.1~223 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=e1aa0559c7a6cd1919bdf666499c54abbb0cc687;p=tt-rss.git fix reset to default for mysql --- diff --git a/backend.php b/backend.php index 4d0753b8..1cfab2ab 100644 --- a/backend.php +++ b/backend.php @@ -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");