* mark get_pref/set_pref wrappers as deprecated

* add per-user preference for minimal score required for digest
This commit is contained in:
Andrew Dolgov
2024-01-09 11:45:40 +03:00
parent ea6cdcccb0
commit bcdfedeb8a
4 changed files with 15 additions and 5 deletions

View File

@@ -38,6 +38,8 @@
/**
* @return bool|int|null|string
*
* @deprecated by Prefs::get()
*/
function get_pref(string $pref_name, int $owner_uid = null) {
return Prefs::get($pref_name, $owner_uid ? $owner_uid : $_SESSION["uid"], $_SESSION["profile"] ?? null);
@@ -45,6 +47,8 @@
/**
* @param bool|int|string $value
*
* @deprecated by Prefs::set()
*/
function set_pref(string $pref_name, $value, int $owner_uid = null, bool $strip_tags = true): bool {
return Prefs::set($pref_name, $value, $owner_uid ? $owner_uid : $_SESSION["uid"], $_SESSION["profile"] ?? null, $strip_tags);