]> git.mxchange.org Git - friendica.git/blobdiff - src/Worker/PollContacts.php
Fill the item cache when storing item
[friendica.git] / src / Worker / PollContacts.php
index b3ac529de4aa8569dc9f6c9be9a82bc3b43e8c79..b61f5aebb82afb194f93de7f6c1972146c829f33 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /**
- * @copyright Copyright (C) 2020, Friendica
+ * @copyright Copyright (C) 2010-2022, the Friendica project
  *
  * @license GNU AGPL version 3 or any later version
  *
@@ -45,7 +45,7 @@ class PollContacts
 
                if (!empty($abandon_days)) {
                        $condition = DBA::mergeConditions($condition,
-                               ["`uid` != ? AND `uid` IN (SELECT `uid` FROM `user` WHERE NOT `account_expired` AND NOT `account_removed`  AND `login_date` > UTC_TIMESTAMP() - INTERVAL ? DAY)", 0, $abandon_days]);
+                               ["`uid` != ? AND `uid` IN (SELECT `uid` FROM `user` WHERE NOT `account_expired` AND NOT `account_removed`  AND `login_date` > ?)", 0, DateTimeFormat::utc('now - ' . $abandon_days . ' days')]);
                } else  {
                        $condition = DBA::mergeConditions($condition,
                                ["`uid` != ? AND `uid` IN (SELECT `uid` FROM `user` WHERE NOT `account_expired` AND NOT `account_removed`)", 0]);