X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=include%2Fonepoll.php;h=2f9bb35d36af17cd0a6cfd9b90a90a5eb7ce7652;hb=6a8a36f12d00f35004fbb034972ca87dd1a3c4f5;hp=4ac5f38bee43e919a9901104f0ae64b7a2020086;hpb=293436e5fd5110220c969513858dbb979f1f35d3;p=friendica.git diff --git a/include/onepoll.php b/include/onepoll.php index 4ac5f38bee..2f9bb35d36 100644 --- a/include/onepoll.php +++ b/include/onepoll.php @@ -93,7 +93,7 @@ function onepoll_run(&$argv, &$argc){ where `cid` = %d and updated > UTC_TIMESTAMP() - INTERVAL 1 DAY", intval($contact['id']) ); - if (count($r)) + if (dbm::is_result($r)) if (!$r[0]['total']) poco_load($contact['id'],$importer_uid,0,$contact['poco']); } @@ -143,7 +143,7 @@ function onepoll_run(&$argv, &$argc){ $r = q("SELECT `contact`.*, `user`.`page-flags` FROM `contact` INNER JOIN `user` on `contact`.`uid` = `user`.`uid` WHERE `user`.`uid` = %d AND `contact`.`self` = 1 LIMIT 1", intval($importer_uid) ); - if(! count($r)) + if(! dbm::is_result($r)) return; $importer = $r[0]; @@ -393,7 +393,7 @@ function onepoll_run(&$argv, &$argc){ dbesc($datarray['uri']) ); - if(count($r)) { + if(dbm::is_result($r)) { logger("Mail: Seen before ".$msg_uid." for ".$mailconf[0]['user']." UID: ".$importer_uid." URI: ".$datarray['uri'],LOGGER_DEBUG); // Only delete when mails aren't automatically moved or deleted @@ -446,7 +446,7 @@ function onepoll_run(&$argv, &$argc){ $r = q("SELECT `uri` , `parent-uri` FROM `item` USE INDEX (`uid_uri`) WHERE `uri` IN ($qstr) AND `uid` = %d LIMIT 1", intval($importer_uid) ); - if(count($r)) + if(dbm::is_result($r)) $datarray['parent-uri'] = $r[0]['parent-uri']; // Set the parent as the top-level item // $datarray['parent-uri'] = $r[0]['uri']; } @@ -479,7 +479,7 @@ function onepoll_run(&$argv, &$argc){ dbesc(protect_sprintf($datarray['title'])), intval($importer_uid), dbesc(NETWORK_MAIL)); - if(count($r)) + if(dbm::is_result($r)) $datarray['parent-uri'] = $r[0]['parent-uri']; }