aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Daemon/Onepoll.php
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2021-10-10 08:37:44 +0000
committerMario <mario@mariovavti.com>2021-10-10 08:37:44 +0000
commitb90228b319eb2f76b52ea09af23bc5b6596e280c (patch)
tree24f8e85f30c2dac63ea612c85c54f668deeed46a /Zotlabs/Daemon/Onepoll.php
parentad2c165f26625614086283d1efffcc411bc1c108 (diff)
downloadvolse-hubzilla-b90228b319eb2f76b52ea09af23bc5b6596e280c.tar.gz
volse-hubzilla-b90228b319eb2f76b52ea09af23bc5b6596e280c.tar.bz2
volse-hubzilla-b90228b319eb2f76b52ea09af23bc5b6596e280c.zip
make sure we do not select removed channels as importer in onepoll
Diffstat (limited to 'Zotlabs/Daemon/Onepoll.php')
-rw-r--r--Zotlabs/Daemon/Onepoll.php8
1 files changed, 2 insertions, 6 deletions
diff --git a/Zotlabs/Daemon/Onepoll.php b/Zotlabs/Daemon/Onepoll.php
index e2a02ede4..79fd06df9 100644
--- a/Zotlabs/Daemon/Onepoll.php
+++ b/Zotlabs/Daemon/Onepoll.php
@@ -48,15 +48,11 @@ class Onepoll {
$contact = $contacts[0];
$importer_uid = $contact['abook_channel'];
- $r = q("SELECT * from channel left join xchan on channel_hash = xchan_hash where channel_id = %d limit 1",
- intval($importer_uid)
- );
+ $importer = channelx_by_n($importer_uid);
- if (!$r)
+ if (!$importer)
return;
- $importer = $r[0];
-
logger("onepoll: poll: ({$contact['id']}) IMPORTER: {$importer['xchan_name']}, CONTACT: {$contact['xchan_name']}");
$last_update = ((($contact['abook_updated'] === $contact['abook_created']) || ($contact['abook_updated'] <= NULL_DATE))