X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=include%2Facl_selectors.php;h=91f94155900adba71fbd74e3cb356340c2ea9465;hb=97d31255e5f0eb62adefc6b3cf3a037da49e94fb;hp=dd8864a631798302af0b04b02781f2f6e11f3ab3;hpb=724a58e79a664b65a3b68a4e3eb7fc88e1958af5;p=friendica.git diff --git a/include/acl_selectors.php b/include/acl_selectors.php index dd8864a631..91f9415590 100644 --- a/include/acl_selectors.php +++ b/include/acl_selectors.php @@ -186,9 +186,6 @@ function contact_selector($selname, $selclass, $options, $preselected = false) function contact_select($selname, $selclass, $preselected = false, $size = 4, $privmail = false, $celeb = false, $privatenet = false, $tabindex = null) { - - require_once "include/bbcode.php"; - $a = get_app(); $o = ''; @@ -409,7 +406,7 @@ function acl_lookup(App $a, $out_type = 'json') $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)."%%'"; @@ -616,6 +613,14 @@ function acl_lookup(App $a, $out_type = 'json') $items = array_merge($groups, $contacts); + // At multi threaded posts the conv_id is not the parent of the whole thread + if ($conv_id > 0) { + $parent_item = dba::selectFirst('item', ['parent'], ['id' => $conv_id]); + if (DBM::is_result($parent_item)) { + $conv_id = $parent_item['parent']; + } + } + if ($conv_id) { /* * if $conv_id is set, get unknown contacts in thread