summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2010-01-13 18:57:48 +0300
committerAndrew Dolgov <[email protected]>2010-01-13 18:57:48 +0300
commit1a697fa300eb82d6c1dafe0ff3c77207623279a6 (patch)
tree33e0824cce65853e546a660a8eec620705ed26be /modules
parentde0a6d930aba84b80b62f94a7f11e673712fab46 (diff)
misc prefs tweaks
Diffstat (limited to 'modules')
-rw-r--r--modules/pref-prefs.php21
1 files changed, 14 insertions, 7 deletions
diff --git a/modules/pref-prefs.php b/modules/pref-prefs.php
index b789720d4..367dfe406 100644
--- a/modules/pref-prefs.php
+++ b/modules/pref-prefs.php
@@ -107,8 +107,6 @@
$theme_path = "";
}
- $_SESSION["theme"] = $theme_path;
-
print "PREFS_THEME_CHANGED";
} else {
print __("The configuration was saved.");
@@ -146,11 +144,20 @@
$_SESSION["prefs_op_result"] = "reset-to-defaults";
+ if ($_SESSION["profile"]) {
+ $profile_qpart = "profile = '" . $_SESSION["profile"] . "'";
+ } else {
+ $profile_qpart = "profile IS NULL";
+ }
+
db_query($link, "DELETE FROM ttrss_user_prefs
- WHERE owner_uid = ".$_SESSION["uid"]);
- initialize_user_prefs($link, $_SESSION["uid"]);
+ WHERE $profile_qpart AND owner_uid = ".$_SESSION["uid"]);
+
+ initialize_user_prefs($link, $_SESSION["uid"], $_SESSION["profile"]);
- print __("The configuration was reset to defaults.");
+ print "PREFS_THEME_CHANGED";
+
+// print __("The configuration was reset to defaults.");
return;
@@ -183,9 +190,9 @@
$_SESSION["pwd_change_result"] = ""; */
- if ($_SESSION["prefs_op_result"] == "reset-to-defaults") {
+/* if ($_SESSION["prefs_op_result"] == "reset-to-defaults") {
print format_notice(__("The configuration was reset to defaults."));
- }
+} */
# if ($_SESSION["prefs_op_result"] == "save-config") {
# print format_notice(__("The configuration was saved."));