summaryrefslogtreecommitdiff
path: root/db-prefs.php
diff options
context:
space:
mode:
Diffstat (limited to 'db-prefs.php')
-rw-r--r--db-prefs.php14
1 files changed, 14 insertions, 0 deletions
diff --git a/db-prefs.php b/db-prefs.php
index 293af7bea..1b6262d9a 100644
--- a/db-prefs.php
+++ b/db-prefs.php
@@ -57,4 +57,18 @@
return $value;
}
}
+
+ // doesn't peform any type checking, be vigilant
+
+ function set_pref($link, $key, $value) {
+ $key = db_escape_string($key);
+ $value = db_escape_string($value);
+
+ db_query($link, "UPDATE ttrss_user_prefs SET
+ value = '$value' WHERE pref_name = '$key'
+ AND owner_uid = " . $_SESSION["uid"]);
+
+ $_SESSION["prefs_cache"] = array();
+
+ }
?>