From 0292d46e5de06529012ebb14ce934fb476d595d0 Mon Sep 17 00:00:00 2001 From: friendica Date: Thu, 9 Aug 2012 16:26:44 -0700 Subject: merge comment threading, provide plugin/theme functions to handle css/js includes --- mod/item.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'mod/item.php') diff --git a/mod/item.php b/mod/item.php index 87f7f75d9..757506bc4 100644 --- a/mod/item.php +++ b/mod/item.php @@ -92,6 +92,7 @@ function item_post(&$a) { // if this isn't the real parent of the conversation, find it if($r !== false && count($r)) { $parid = $r[0]['parent']; + $parent_uri = $r[0]['uri']; if($r[0]['id'] != $r[0]['parent']) { $r = q("SELECT * FROM `item` WHERE `id` = `parent` AND `parent` = %d LIMIT 1", intval($parid) @@ -109,7 +110,7 @@ function item_post(&$a) { $parent = $r[0]['id']; // multi-level threading - preserve the info but re-parent to our single level threading - if(($parid) && ($parid != $parent)) + //if(($parid) && ($parid != $parent)) $thr_parent = $parent_uri; if($parent_item['contact-id'] && $uid) { @@ -549,6 +550,10 @@ function item_post(&$a) { $uri = item_new_uri($a->get_hostname(),$profile_uid); + // Fallback so that we alway have a thr-parent + if(!$thr_parent) + $thr_parent = $uri; + $datarray = array(); $datarray['uid'] = $profile_uid; $datarray['type'] = $post_type; -- cgit v1.2.3