diff options
| author | Andrew Dolgov <fox@fakecake.org> | 2025-05-18 07:50:05 +0300 |
|---|---|---|
| committer | Andrew Dolgov <fox@fakecake.org> | 2025-05-18 07:50:05 +0300 |
| commit | 895e29ec26d4867688807ae3cd7b28face88dc90 (patch) | |
| tree | 612fbc72b3d3708984c6e9b5cfa11bc69bb76e7e /update.php | |
| parent | 868c1cadad9a370d05f3ff72710bd488689bafdf (diff) | |
| parent | c472f00445a91331e396511229f469de70302588 (diff) | |
Merge branch 'feature/remove-past-comparison-qpart' into 'master'
Get rid of 'Db::past_comparison_qpart()'.
See merge request tt-rss/tt-rss!134
Diffstat (limited to 'update.php')
| -rwxr-xr-x | update.php | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/update.php b/update.php index dfac5ab4c..9df6a0abe 100755 --- a/update.php +++ b/update.php @@ -33,8 +33,6 @@ } function cleanup_tags(int $days = 14, int $limit = 1000): int { - $interval_query = Db::past_comparison_qpart('e.date_updated', '<', $days, 'day'); - $tags_deleted = 0; $limit_part = 500; @@ -45,7 +43,7 @@ ->join('ttrss_user_entries', ['ue.int_id', '=', 't.post_int_id'], 'ue') ->join('ttrss_entries', ['e.id', '=', 'ue.ref_id'], 'e') ->where_not_equal('ue.tag_cache', '') - ->where_raw($interval_query) + ->where_raw("e.date_updated < NOW() - INTERVAL '$days day'") ->limit($limit_part) ->find_many(); |