aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Module/Channel.php
diff options
context:
space:
mode:
Diffstat (limited to 'Zotlabs/Module/Channel.php')
-rw-r--r--Zotlabs/Module/Channel.php15
1 files changed, 9 insertions, 6 deletions
diff --git a/Zotlabs/Module/Channel.php b/Zotlabs/Module/Channel.php
index 9671cedf3..f73f25d5f 100644
--- a/Zotlabs/Module/Channel.php
+++ b/Zotlabs/Module/Channel.php
@@ -337,7 +337,7 @@ class Channel extends Controller {
if (($update) && (!$load)) {
if ($mid) {
- $r = q("SELECT parent AS item_id from item where $identifier = '%s' and uid = %d $item_normal_update
+ $r = q("SELECT *, parent AS item_id from item where $identifier = '%s' and uid = %d $item_normal_update
AND item_wall = 1 $simple_update $permission_sql $sql_extra limit 1",
dbesc($mid),
intval(App::$profile['profile_uid'])
@@ -386,7 +386,7 @@ class Channel extends Controller {
if ($noscript_content || $load) {
if ($mid) {
- $r = q("SELECT parent AS item_id from item where $identifier = '%s' and uid = %d $item_normal
+ $r = q("SELECT *, parent AS item_id from item where $identifier = '%s' and uid = %d $item_normal
AND item_wall = 1 $permission_sql $sql_extra limit 1",
dbesc($mid),
intval(App::$profile['profile_uid'])
@@ -417,12 +417,15 @@ class Channel extends Controller {
}
}
if ($r) {
- $parents_str = ids_to_querystr($r, 'item_id');
+ $thr_parents = null;
+ if ($mid) {
+ $thr_parents = get_recursive_thr_parents($r[0]);
+ }
- $r = items_by_parent_ids($parents_str, permission_sql: $permission_sql, blog_mode: $blog_mode);
+ $items = items_by_parent_ids($r, $thr_parents, $permission_sql, $blog_mode);
- xchan_query($r);
- $items = fetch_post_tags($r, true);
+ xchan_query($items);
+ $items = fetch_post_tags($items, true);
$items = conv_sort($items, $ordering);
if ($load && $mid && (!count($items))) {