diff options
author | Andrew Dolgov <[email protected]> | 2024-01-09 11:45:40 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2024-01-09 11:45:40 +0300 |
commit | bcdfedeb8a7836c25791d592e5ae4e0f5454c265 (patch) | |
tree | 050bac479a46cac782ac152f7bb280723717ae21 /classes/Digest.php | |
parent | ea6cdcccb09f6e254f5de532010b8deea837c339 (diff) |
* mark get_pref/set_pref wrappers as deprecated
* add per-user preference for minimal score required for digest
Diffstat (limited to 'classes/Digest.php')
-rw-r--r-- | classes/Digest.php | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/classes/Digest.php b/classes/Digest.php index 95827b310..6005f5fe4 100644 --- a/classes/Digest.php +++ b/classes/Digest.php @@ -92,7 +92,8 @@ class Digest $tpl->readTemplateFromFile("digest_template_html.txt"); $tpl_t->readTemplateFromFile("digest_template.txt"); - $user_tz_string = get_pref(Prefs::USER_TIMEZONE, $user_id); + $user_tz_string = Prefs::get(Prefs::USER_TIMEZONE, $user_id); + $min_score = Prefs::get(Prefs::DIGEST_MIN_SCORE, $user_id); if ($user_tz_string == 'Automatic') $user_tz_string = 'GMT'; @@ -136,10 +137,10 @@ class Digest AND $interval_qpart AND ttrss_user_entries.owner_uid = :user_id AND unread = true - AND score >= 0 + AND score >= :min_score ORDER BY ttrss_feed_categories.title, ttrss_feeds.title, score DESC, date_updated DESC LIMIT " . (int)$limit); - $sth->execute([':user_id' => $user_id]); + $sth->execute([':user_id' => $user_id, ':min_score' => $min_score]); $headlines_count = 0; $headlines = array(); |