summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2021-02-25 12:53:20 +0300
committerAndrew Dolgov <[email protected]>2021-02-25 12:53:20 +0300
commit2621fe795551b99c6c6ca9d5c2b7115345decca1 (patch)
treece22601cc7ddaea58b5ddae08eddbef4e97a39c1 /include
parentbd2314170dc183c154c2af05686ddb0224b5d133 (diff)
fix get_pref always using default profile; remove unneeded code from db_prefs
Diffstat (limited to 'include')
-rw-r--r--include/functions.php4
1 files changed, 1 insertions, 3 deletions
diff --git a/include/functions.php b/include/functions.php
index 3ed024d11..8e819fac0 100644
--- a/include/functions.php
+++ b/include/functions.php
@@ -43,13 +43,11 @@
}
function get_pref(string $pref_name, int $owner_uid = null) {
- return Prefs::get($pref_name, $owner_uid ? $owner_uid : $_SESSION["uid"]);
- //return Db_Prefs::get()->read($pref_name, $user_id, $die_on_error);
+ return Prefs::get($pref_name, $owner_uid ? $owner_uid : $_SESSION["uid"], $_SESSION["profile"] ?? null);
}
function set_pref(string $pref_name, $value, int $owner_uid = null, bool $strip_tags = true) {
return Prefs::set($pref_name, $value, $owner_uid ? $owner_uid : $_SESSION["uid"], $_SESSION["profile"] ?? null, $strip_tags);
- //return Db_Prefs::get()->write($pref_name, $value, $user_id, $strip_tags);
}
function get_translations() {