diff options
author | Mario <mario@mariovavti.com> | 2025-06-01 10:44:33 +0000 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2025-06-01 10:44:33 +0000 |
commit | 940fd26db747a56df59b14e3f0c1ca6ffd26e26a (patch) | |
tree | 65106667db00f22466501c87ea293b7adec76821 /Zotlabs/Module | |
parent | fca6ddd35b24804c44d55ac37c6a896e38067dc8 (diff) | |
download | volse-hubzilla-940fd26db747a56df59b14e3f0c1ca6ffd26e26a.tar.gz volse-hubzilla-940fd26db747a56df59b14e3f0c1ca6ffd26e26a.tar.bz2 volse-hubzilla-940fd26db747a56df59b14e3f0c1ca6ffd26e26a.zip |
add the thr_parents if we are in channel single view mode
Diffstat (limited to 'Zotlabs/Module')
-rw-r--r-- | Zotlabs/Module/Channel.php | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/Zotlabs/Module/Channel.php b/Zotlabs/Module/Channel.php index 27c627e34..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,7 +417,12 @@ class Channel extends Controller { } } if ($r) { - $items = items_by_parent_ids($r, permission_sql: $permission_sql, blog_mode: $blog_mode); + $thr_parents = null; + if ($mid) { + $thr_parents = get_recursive_thr_parents($r[0]); + } + + $items = items_by_parent_ids($r, $thr_parents, $permission_sql, $blog_mode); xchan_query($items); $items = fetch_post_tags($items, true); |