diff options
author | Mario <mario@mariovavti.com> | 2025-05-17 16:18:20 +0000 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2025-05-17 16:18:20 +0000 |
commit | cf317aa1a116e43b0ae4d6ec513d018dbe7151a4 (patch) | |
tree | edeae89a8abd240055b7177ffab5c874db72e5b7 | |
parent | bd1e282499d832b8c41bdbf8e9b53d3baba9f2e5 (diff) | |
download | volse-hubzilla-cf317aa1a116e43b0ae4d6ec513d018dbe7151a4.tar.gz volse-hubzilla-cf317aa1a116e43b0ae4d6ec513d018dbe7151a4.tar.bz2 volse-hubzilla-cf317aa1a116e43b0ae4d6ec513d018dbe7151a4.zip |
revert moving thr_parent retrieval to SQL in favor of a more simple solution (fixes SQL error in postgres and strict mysql)Zotlabs/Lib/ThreadItem.php
-rw-r--r-- | include/items.php | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/include/items.php b/include/items.php index ee8f856d7..edf87a7fd 100644 --- a/include/items.php +++ b/include/items.php @@ -5460,15 +5460,6 @@ function items_by_parent_ids(string $ids, string $thr_parents = '', string $perm $thr_parent_sql = " AND item.thr_parent IN (" . protect_sprintf($thr_parents) . ") "; } - $thr_parent_uuid_sql = ''; - $thr_parent_uuid_sql_join = ''; - - if (!$thread_allow) { - // this is required for navigation between replies if thread_allow is false - $thr_parent_uuid_sql = "tp.uuid AS thr_parent_uuid,"; - $thr_parent_uuid_sql_join = "LEFT JOIN item tp ON item.thr_parent = tp.mid AND item.uid = tp.uid"; - } - $permission_sql_c = ''; if ($permission_sql) { $permission_sql_c = str_replace('item.', 'c.', $permission_sql); @@ -5476,7 +5467,6 @@ function items_by_parent_ids(string $ids, string $thr_parents = '', string $perm $ret = q( "SELECT item.*, - $thr_parent_uuid_sql $activity_sql FROM item LEFT JOIN item c @@ -5485,7 +5475,6 @@ function items_by_parent_ids(string $ids, string $thr_parents = '', string $perm AND c.thr_parent = item.mid $item_normal_c $permission_sql_c - $thr_parent_uuid_sql_join WHERE $blog_mode_sql in (%s) AND ( item.verb NOT IN ('Like', 'Dislike', 'Announce') |