aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax Kostikov <max@kostikov.co>2019-05-01 19:10:46 +0200
committerMax Kostikov <max@kostikov.co>2019-05-01 19:10:46 +0200
commit1e7e2bd34f0535beb64dbe4ca53d8a20ae4e9a6b (patch)
tree74d716a8c56b5756781d2635b41e8362aa5cf7f9
parentfa2f3d136fc0fee9213bf2999ad2042fd84d9466 (diff)
downloadvolse-hubzilla-1e7e2bd34f0535beb64dbe4ca53d8a20ae4e9a6b.tar.gz
volse-hubzilla-1e7e2bd34f0535beb64dbe4ca53d8a20ae4e9a6b.tar.bz2
volse-hubzilla-1e7e2bd34f0535beb64dbe4ca53d8a20ae4e9a6b.zip
Update Item.php
-rw-r--r--Zotlabs/Module/Item.php14
1 files changed, 5 insertions, 9 deletions
diff --git a/Zotlabs/Module/Item.php b/Zotlabs/Module/Item.php
index 93df95f49..6bc8c645f 100644
--- a/Zotlabs/Module/Item.php
+++ b/Zotlabs/Module/Item.php
@@ -216,7 +216,7 @@ class Item extends Controller {
$parent = ((x($_REQUEST,'parent')) ? intval($_REQUEST['parent']) : 0);
$parent_mid = ((x($_REQUEST,'parent_mid')) ? trim($_REQUEST['parent_mid']) : '');
-
+
$remote_xchan = ((x($_REQUEST,'remote_xchan')) ? trim($_REQUEST['remote_xchan']) : false);
$r = q("select * from xchan where xchan_hash = '%s' limit 1",
dbesc($remote_xchan)
@@ -329,13 +329,8 @@ class Item extends Controller {
$obj_type = ACTIVITY_OBJ_COMMENT;
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",
- intval($reply[0]['parent'])
+ intval($parent)
);
}
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
- $thr_parent = $reply[0]['mid'];
+ $thr_parent = $parent_mid;
$route = $parent_item['route'];
@@ -918,6 +913,7 @@ class Item extends Controller {
$parent_mid = $parent_item['mid'];
+
// Fallback so that we alway have a thr_parent
if(!$thr_parent)
@@ -1018,7 +1014,7 @@ class Item extends Controller {
$datarray['term'] = $post_tags;
$datarray['plink'] = $plink;
$datarray['route'] = $route;
-
+
// A specific ACL over-rides public_policy completely