diff options
author | Andrew Dolgov <[email protected]> | 2021-02-25 14:49:58 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2021-02-25 14:49:58 +0300 |
commit | c96172fa044d847fee237d966a6e75f8be5afa4d (patch) | |
tree | cdd79fdea548ab41b642fca12be7634ad8d25d2d /classes/digest.php | |
parent | 5aa05c90e1b979a2dd8985c10a541243e9415c39 (diff) |
use constants in get_pref()/set_pref()
Diffstat (limited to 'classes/digest.php')
-rw-r--r-- | classes/digest.php | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/classes/digest.php b/classes/digest.php index e158af85d..26ca5221f 100644 --- a/classes/digest.php +++ b/classes/digest.php @@ -21,8 +21,8 @@ class Digest while ($line = $res->fetch()) { - if (get_pref('DIGEST_ENABLE', $line['id'])) { - $preferred_ts = strtotime(get_pref('DIGEST_PREFERRED_TIME', $line['id'])); + if (get_pref(Prefs::DIGEST_ENABLE, $line['id'])) { + $preferred_ts = strtotime(get_pref(Prefs::DIGEST_PREFERRED_TIME, $line['id'])); // try to send digests within 2 hours of preferred time if ($preferred_ts && time() >= $preferred_ts && @@ -31,7 +31,7 @@ class Digest Debug::log("Sending digest for UID:" . $line['id'] . " - " . $line["email"]); - $do_catchup = get_pref('DIGEST_CATCHUP', $line['id']); + $do_catchup = get_pref(Prefs::DIGEST_CATCHUP, $line['id']); global $tz_offset; @@ -86,7 +86,7 @@ class Digest $tpl->readTemplateFromFile("digest_template_html.txt"); $tpl_t->readTemplateFromFile("digest_template.txt"); - $user_tz_string = get_pref('USER_TIMEZONE', $user_id); + $user_tz_string = get_pref(Prefs::USER_TIMEZONE, $user_id); $local_ts = TimeHelper::convert_timestamp(time(), 'UTC', $user_tz_string); $tpl->setVariable('CUR_DATE', date('Y/m/d', $local_ts)); @@ -152,7 +152,7 @@ class Digest $updated = TimeHelper::make_local_datetime($line['last_updated'], false, $user_id); - if (get_pref('ENABLE_FEED_CATS', $user_id)) { + if (get_pref(Prefs::ENABLE_FEED_CATS, $user_id)) { $line['feed_title'] = $line['cat_title'] . " / " . $line['feed_title']; } |