Eliminate use of deprecated 'get_pref()' and 'set_pref()'.

This commit is contained in:
wn_
2024-11-17 22:14:08 +00:00
parent 394d606fe9
commit 154abc61a0
18 changed files with 111 additions and 81 deletions

View File

@@ -20,8 +20,8 @@ class Digest
while ($line = $res->fetch()) {
if (get_pref(Prefs::DIGEST_ENABLE, $line['id'])) {
$preferred_ts = strtotime(get_pref(Prefs::DIGEST_PREFERRED_TIME, $line['id']) ?? '');
if (Prefs::get(Prefs::DIGEST_ENABLE, $line['id'])) {
$preferred_ts = strtotime(Prefs::get(Prefs::DIGEST_PREFERRED_TIME, $line['id']) ?? '');
// try to send digests within 2 hours of preferred time
if ($preferred_ts && time() >= $preferred_ts &&
@@ -30,7 +30,7 @@ class Digest
Debug::log("Sending digest for UID:" . $line['id'] . " - " . $line["email"]);
$do_catchup = get_pref(Prefs::DIGEST_CATCHUP, $line['id']);
$do_catchup = Prefs::get(Prefs::DIGEST_CATCHUP, $line['id']);
global $tz_offset;
@@ -156,7 +156,7 @@ class Digest
$updated = TimeHelper::make_local_datetime($line['last_updated'], false,
$user_id);
if (get_pref(Prefs::ENABLE_FEED_CATS, $user_id)) {
if (Prefs::get(Prefs::ENABLE_FEED_CATS, $user_id)) {
$line['feed_title'] = $line['cat_title'] . " / " . $line['feed_title'];
}