"last_contact" is now set automatically if it is lower than the update value.

This commit is contained in:
Michael Vogel
2015-07-23 20:57:08 +02:00
parent 201d95a855
commit cbd2fc1572
2 changed files with 6 additions and 2 deletions
+1 -1
View File
@@ -61,7 +61,7 @@ function poco_init(&$a) {
$update_limit = date("Y-m-d H:i:s",strtotime($_GET['updatedSince']));
if ($global) {
$r = q("SELECT count(*) AS `total` FROM `gcontact` WHERE `updated` >= '%s' AND `last_contact` >= `last_failure` AND `network` IN ('%s')",
$r = q("SELECT count(*) AS `total` FROM `gcontact` WHERE `updated` >= '%s' AND ((`last_contact` >= `last_failure`) OR (`updated` > `last_failure`)) AND `network` IN ('%s')",
dbesc($update_limit),
dbesc(NETWORK_DFRN)
);