diff options
author | Max Kostikov <max@kostikov.co> | 2019-05-01 15:33:59 +0200 |
---|---|---|
committer | Max Kostikov <max@kostikov.co> | 2019-05-01 15:33:59 +0200 |
commit | 4a91d09c8662a661b197a5382196e683ccf4b78b (patch) | |
tree | c300b3b45f5175d041276d038d4b2d943bac64eb /Zotlabs/Module/Item.php | |
parent | 06837bd32b1d9a9a5c7bb3b966eb80b7f072b4a0 (diff) | |
download | volse-hubzilla-4a91d09c8662a661b197a5382196e683ccf4b78b.tar.gz volse-hubzilla-4a91d09c8662a661b197a5382196e683ccf4b78b.tar.bz2 volse-hubzilla-4a91d09c8662a661b197a5382196e683ccf4b78b.zip |
Use thr_parent for comment replies
Diffstat (limited to 'Zotlabs/Module/Item.php')
-rw-r--r-- | Zotlabs/Module/Item.php | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/Zotlabs/Module/Item.php b/Zotlabs/Module/Item.php index 11ce1d268..6113e8102 100644 --- a/Zotlabs/Module/Item.php +++ b/Zotlabs/Module/Item.php @@ -329,13 +329,13 @@ class Item extends Controller { $obj_type = ACTIVITY_OBJ_COMMENT; if($parent) { - // Get commented post data - $rr = q("SELECT parent, mid FROM item WHERE id = %d LIMIT 1", + // Get replied comment data + $reply = q("SELECT parent, mid FROM item WHERE id = %d LIMIT 1", intval($parent) ); // and its parent $r = q("SELECT * FROM item WHERE id = %d LIMIT 1", - intval($rr[0]['parent']) + intval($reply[0]['parent']) ); } elseif($parent_mid && $uid) { @@ -379,7 +379,7 @@ class Item extends Controller { // multi-level threading - preserve the info but re-parent to our single level threading - $thr_parent = $parent_mid; + $thr_parent = $reply[0]['mid']; $route = $parent_item['route']; @@ -915,7 +915,7 @@ class Item extends Controller { } if($parent_item) - $parent_mid = $rr[0]['mid']; + $parent_mid = $parent_item['mid']; // Fallback so that we alway have a thr_parent @@ -1164,7 +1164,7 @@ class Item extends Controller { 'verb' => ACTIVITY_POST, 'otype' => 'item', 'parent' => $parent, - 'parent_mid' => $rr[0]['mid'] + 'parent_mid' => $parent_item['mid']; )); } |