2013-04-18 08:00:01 +00:00
|
|
|
<?php
|
|
|
|
class Db_Prefs {
|
2021-02-25 09:53:20 +00:00
|
|
|
// this class is a stub for the time being (to be removed)
|
2013-04-18 08:00:01 +00:00
|
|
|
|
2021-11-12 05:24:02 +00:00
|
|
|
/**
|
|
|
|
* @return bool|int|null|string
|
|
|
|
*/
|
|
|
|
function read(string $pref_name, ?int $user_id = null, bool $die_on_error = false) {
|
2021-02-25 09:53:20 +00:00
|
|
|
return get_pref($pref_name, $user_id);
|
2013-04-18 08:00:01 +00:00
|
|
|
}
|
|
|
|
|
2021-11-12 05:24:02 +00:00
|
|
|
/**
|
|
|
|
* @param mixed $value
|
|
|
|
*/
|
|
|
|
function write(string $pref_name, $value, ?int $user_id = null, bool $strip_tags = true): bool {
|
2021-02-25 09:53:20 +00:00
|
|
|
return set_pref($pref_name, $value, $user_id, $strip_tags);
|
2013-04-18 08:00:01 +00:00
|
|
|
}
|
2017-04-26 21:24:17 +00:00
|
|
|
}
|