aboutsummaryrefslogtreecommitdiffstats
path: root/mod/item.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2012-08-09 16:26:44 -0700
committerfriendica <info@friendica.com>2012-08-09 16:26:44 -0700
commit0292d46e5de06529012ebb14ce934fb476d595d0 (patch)
tree16208e490a8e2d6d90996c936c6f467533aaf612 /mod/item.php
parent432595314affa179bdce439d6e90955cee99cd9e (diff)
downloadvolse-hubzilla-0292d46e5de06529012ebb14ce934fb476d595d0.tar.gz
volse-hubzilla-0292d46e5de06529012ebb14ce934fb476d595d0.tar.bz2
volse-hubzilla-0292d46e5de06529012ebb14ce934fb476d595d0.zip
merge comment threading, provide plugin/theme functions to handle css/js includes
Diffstat (limited to 'mod/item.php')
-rw-r--r--mod/item.php7
1 files changed, 6 insertions, 1 deletions
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;