Eliminate use of deprecated 'get_pref()' and 'set_pref()'.
This commit is contained in:
@@ -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'];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user