From f3fdbb6021bd2e20f728149e7534ffdaadbfda36 Mon Sep 17 00:00:00 2001 From: friendica Date: Tue, 27 Nov 2012 03:08:26 -0800 Subject: tracking through comments --- include/notifier.php | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'include/notifier.php') diff --git a/include/notifier.php b/include/notifier.php index 6a70bd738..b4ccf69cc 100644 --- a/include/notifier.php +++ b/include/notifier.php @@ -168,15 +168,16 @@ function notifier_run($argv, $argc){ // Normal items // Fetch the target item - +dbg(1); $r = q("SELECT * FROM item WHERE id = %d and parent != 0 LIMIT 1", intval($item_id) ); if(! $r) return; - +logger('notify1'); xchan_query($r); +dbg(0); $r = fetch_post_tags($r); $target_item = $r[0]; @@ -187,6 +188,7 @@ function notifier_run($argv, $argc){ if($s) $channel = $s[0]; +logger('notify2'); if($target_item['id'] == $target_item['parent']) { $parent_item = $target_item; $top_level_post = true; @@ -194,8 +196,11 @@ function notifier_run($argv, $argc){ else { // fetch the parent item $r = q("SELECT * from item where id = %d order by id asc", - intval($parent_id) + intval($target_item['parent']) ); + +logger('notify3'); + if(! $r) return; xchan_query($r); @@ -204,6 +209,7 @@ function notifier_run($argv, $argc){ $parent_item = $r[0]; $top_level_post = false; } +logger('notify4'); $encoded_item = encode_item($target_item); -- cgit v1.2.3