X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=include%2Facl_selectors.php;h=6070b7db21124d046d2a197d7532fd6ea55a08f5;hb=6edd6d8ae1e3a6b64fa11ae6a4cc79965084b0d7;hp=953243a437fac1a600ef2862c4ed16df3b0568d8;hpb=53dff2204bf2cbe46b6cbdb7174fa0cf1a7162b1;p=friendica.git diff --git a/include/acl_selectors.php b/include/acl_selectors.php old mode 100644 new mode 100755 index 953243a437..6070b7db21 --- a/include/acl_selectors.php +++ b/include/acl_selectors.php @@ -10,7 +10,7 @@ function group_select($selname,$selclass,$preselected = false,$size = 4) { $o .= "\r\n"; + else + $o .= "\r\n"; + + call_hooks($a->module . '_post_' . $selname, $o); + + return $o; +} + + function contact_select($selname, $selclass, $preselected = false, $size = 4, $privmail = false, $celeb = false, $privatenet = false) { + $a = get_app(); + $o = ''; - // When used for private messages, we limit correspondence to mutual friends and the selector + // When used for private messages, we limit correspondence to mutual DFRN/Friendica friends and the selector // to one recipient. By default our selector allows multiple selects amongst all contacts. $sql_extra = ''; if($privmail || $celeb) { - $sql_extra .= sprintf(" AND `rel` = %d ", intval(REL_BUD)); + $sql_extra .= sprintf(" AND `rel` = %d ", intval(CONTACT_IS_FRIEND)); + } + + if($privmail) { + $sql_extra .= " AND `network` IN ( 'dfrn', 'dspr' ) "; + } + elseif($privatenet) { + $sql_extra .= " AND `network` IN ( 'dfrn', 'mail', 'face', 'dspr' ) "; } - if($privmail || $privatenet) { - $sql_extra .= " AND `network` IN ( 'dfrn' ) "; - } + if($privmail) $o .= "