Replace old database queries

This commit is contained in:
Michael 2019-06-27 13:30:26 +00:00
parent 59b1a1aced
commit d4dc2a129e

View file

@ -14,6 +14,7 @@ use Friendica\Database\DBA;
use Friendica\Model\APContact; use Friendica\Model\APContact;
use Friendica\Model\Contact; use Friendica\Model\Contact;
use Friendica\Model\Item; use Friendica\Model\Item;
use Friendica\Model\User;
use Friendica\Protocol\ActivityPub; use Friendica\Protocol\ActivityPub;
use Friendica\Protocol\Email; use Friendica\Protocol\Email;
use Friendica\Protocol\PortableContact; use Friendica\Protocol\PortableContact;
@ -106,11 +107,9 @@ class OnePoll
return; return;
} }
$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", $importer = User::getOwnerDataById($importer_uid);
intval($importer_uid)
);
if (!DBA::isResult($r)) { if (empty($importer)) {
Logger::log('No self contact for user '.$importer_uid); Logger::log('No self contact for user '.$importer_uid);
// set the last-update so we don't keep polling // set the last-update so we don't keep polling
@ -118,7 +117,6 @@ class OnePoll
return; return;
} }
$importer = $r[0];
$url = ''; $url = '';
$xml = false; $xml = false;