From aa70cbbf21950e37ab9b5198de76ded0f1c8351d Mon Sep 17 00:00:00 2001 From: zotlabs Date: Wed, 12 Jul 2017 17:16:21 -0700 Subject: fix typos --- include/feedutils.php | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'include/feedutils.php') diff --git a/include/feedutils.php b/include/feedutils.php index fac2a272c..b1fcce9d3 100644 --- a/include/feedutils.php +++ b/include/feedutils.php @@ -1151,17 +1151,19 @@ function consume_feed($xml, $importer, &$contact, $pass = 0) { // check comment permissions on the parent - $r = q("select * from item where parent_mid = '%s' and parent_mid = mid and uid = %d limit 1" + $parent_item = 0; + + $r = q("select * from item where parent_mid = '%s' and parent_mid = mid and uid = %d limit 1", dbesc($pmid), intval($importer['channel_id']) ); if($r) { $parent_item = $r[0]; - - if(intval($parent_item['item_nocomment']) || $parent_item['comment_policy'] === 'none' - || ($parent_item['comments_closed'] > NULL_DATE && $parent_item['comments_closed'] < datetime_convert())) { - logger('comments disabled for post ' . $parent_item['mid']); - continue; + if(intval($parent_item['item_nocomment']) || $parent_item['comment_policy'] === 'none' + || ($parent_item['comments_closed'] > NULL_DATE && $parent_item['comments_closed'] < datetime_convert())) { + logger('comments disabled for post ' . $parent_item['mid']); + continue; + } } $allowed = false; -- cgit v1.2.3