Update Item.php
This commit is contained in:
parent
fa2f3d136f
commit
1e7e2bd34f
@ -329,13 +329,8 @@ class Item extends Controller {
|
|||||||
$obj_type = ACTIVITY_OBJ_COMMENT;
|
$obj_type = ACTIVITY_OBJ_COMMENT;
|
||||||
|
|
||||||
if($parent) {
|
if($parent) {
|
||||||
// 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",
|
$r = q("SELECT * FROM item WHERE id = %d LIMIT 1",
|
||||||
intval($reply[0]['parent'])
|
intval($parent)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
elseif($parent_mid && $uid) {
|
elseif($parent_mid && $uid) {
|
||||||
@ -379,7 +374,7 @@ class Item extends Controller {
|
|||||||
|
|
||||||
// multi-level threading - preserve the info but re-parent to our single level threading
|
// multi-level threading - preserve the info but re-parent to our single level threading
|
||||||
|
|
||||||
$thr_parent = $reply[0]['mid'];
|
$thr_parent = $parent_mid;
|
||||||
|
|
||||||
$route = $parent_item['route'];
|
$route = $parent_item['route'];
|
||||||
|
|
||||||
@ -918,6 +913,7 @@ class Item extends Controller {
|
|||||||
$parent_mid = $parent_item['mid'];
|
$parent_mid = $parent_item['mid'];
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Fallback so that we alway have a thr_parent
|
// Fallback so that we alway have a thr_parent
|
||||||
|
|
||||||
if(!$thr_parent)
|
if(!$thr_parent)
|
||||||
|
Reference in New Issue
Block a user