diff options
| author | wn_ <invalid@email.com> | 2024-11-17 22:14:08 +0000 |
|---|---|---|
| committer | wn_ <invalid@email.com> | 2024-11-18 21:59:45 +0000 |
| commit | 154abc61a0f81bee7757fc57e594f3f4bccc0fdf (patch) | |
| tree | 19deb331e4204003b11b88cc2f1e98cc2440b402 /classes/Db_Prefs.php | |
| parent | 394d606fe977a331f733c62e5509469c2eb3ef31 (diff) | |
Eliminate use of deprecated 'get_pref()' and 'set_pref()'.
Diffstat (limited to 'classes/Db_Prefs.php')
| -rw-r--r-- | classes/Db_Prefs.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/classes/Db_Prefs.php b/classes/Db_Prefs.php index 209ef58c1..55be4f6f6 100644 --- a/classes/Db_Prefs.php +++ b/classes/Db_Prefs.php @@ -6,13 +6,13 @@ class Db_Prefs { * @return bool|int|null|string */ function read(string $pref_name, ?int $user_id = null, bool $die_on_error = false) { - return get_pref($pref_name, $user_id); + return Prefs::get($pref_name, $user_id ?: $_SESSION['uid'], $_SESSION['profile'] ?? null); } /** * @param mixed $value */ function write(string $pref_name, $value, ?int $user_id = null, bool $strip_tags = true): bool { - return set_pref($pref_name, $value, $user_id, $strip_tags); + return Prefs::set($pref_name, $value, $user_id ?: $_SESSION['uid'], $_SESSION['profile'] ?? null, $strip_tags); } } |