mirror of
https://git.tt-rss.org/git/tt-rss.git
synced 2025-12-13 16:15:55 +00:00
fix get_pref always using default profile; remove unneeded code from db_prefs
This commit is contained in:
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user