X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Facl.php;h=817a026553b42ad78788be0c600cb07fbf9d7cb5;hb=5b4fb945a2f8e950d3f3da8ae1fc8127ff887568;hp=11d9e5683a76a9014802c527e3d0cba8d49fa9ad;hpb=ace0200b8cade826d5a49aacda876a279c0c7128;p=friendica.git diff --git a/mod/acl.php b/mod/acl.php index 11d9e5683a..817a026553 100644 --- a/mod/acl.php +++ b/mod/acl.php @@ -32,7 +32,7 @@ function acl_content(App $a) $search = $_REQUEST['query']; } - logger('Searching for ' . $search . ' - type ' . $type, LOGGER_DEBUG); + logger("Searching for ".$search." - type ".$type." conversation ".$conv_id, LOGGER_DEBUG); if ($search != '') { $sql_extra = "AND `name` LIKE '%%" . dbesc($search) . "%%'"; @@ -239,6 +239,12 @@ function acl_content(App $a) $items = array_merge($groups, $contacts); if ($conv_id) { + // In multi threaded posts the conv_id is not the parent of the whole thread + $parent_item = dba::selectFirst('item', ['parent'], ['id' => $conv_id]); + if (DBM::is_result($parent_item)) { + $conv_id = $parent_item['parent']; + } + /* * if $conv_id is set, get unknown contacts in thread * but first get known contacts url to filter them out