mirror of
https://github.com/friendica/friendica
synced 2025-04-22 13:50:12 +00:00
Replace references to UTC_TIMESTAMP in SQL queries with a DateTimeFormat generated parameter
This commit is contained in:
parent
ecaed2a845
commit
80da47921e
14 changed files with 37 additions and 28 deletions
|
@ -2258,8 +2258,8 @@ class Item
|
|||
$condition[] = $network;
|
||||
}
|
||||
|
||||
$condition[0] .= " AND `received` < UTC_TIMESTAMP() - INTERVAL ? DAY";
|
||||
$condition[] = $days;
|
||||
$condition[0] .= " AND `received` < ?";
|
||||
$condition[] = DateTimeFormat::utc('now - ' . $days . ' day');
|
||||
|
||||
$items = Post::select(['resource-id', 'starred', 'id', 'post-type', 'uid', 'uri-id'], $condition);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue