X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=include%2Facl_selectors.php;h=f628b97309bf0b0742d3fa84d610aa9d3bfbd58f;hb=607224b74e6d2725d56c9f6c8b2f1af29705fe3d;hp=d85f60522c47e4305e89f742176e6629d8ce79a3;hpb=8cca849c2e9694ba9bab2e0a6173cd4f5aa2cbdc;p=friendica.git diff --git a/include/acl_selectors.php b/include/acl_selectors.php index d85f60522c..f628b97309 100644 --- a/include/acl_selectors.php +++ b/include/acl_selectors.php @@ -190,8 +190,14 @@ function contact_select($selname, $selclass, $preselected = false, $size = 4, $p $tabindex = ($tabindex > 0 ? "tabindex=\"$tabindex\"" : ""); + if ($privmail AND $preselected) { + $sql_extra .= " AND `id` IN (".implode(",", $preselected).")"; + $hidepreselected = ' style="display: none;"'; + } else + $hidepreselected = ""; + if($privmail) - $o .= "\r\n"; else $o .= "\r\n"; + if ($privmail AND $preselected) + $o .= implode(", ", $receiverlist); + call_hooks($a->module . '_post_' . $selname, $o); return $o; @@ -394,7 +407,7 @@ function acl_lookup(&$a, $out_type = 'json') { $search = $_REQUEST['query']; } - logger("Searching for ".$search." - type ".$type, LOGGER_DEBUG); +// logger("Searching for ".$search." - type ".$type, LOGGER_DEBUG); if ($search!=""){ $sql_extra = "AND `name` LIKE '%%".dbesc($search)."%%'";