diff options
author | Mike Macgirvin <mike@macgirvin.com> | 2010-10-18 00:43:49 -0700 |
---|---|---|
committer | Mike Macgirvin <mike@macgirvin.com> | 2010-10-18 00:43:49 -0700 |
commit | 511c761fec572a093e833541968635ca011cb71e (patch) | |
tree | 3db5bbc37e47d7bfb7da1086483fff28ca66e147 /view/acl_selectors.php | |
parent | be981a4f8a00fa7fb3e5bf9ac47aa38fd5187a35 (diff) | |
download | volse-hubzilla-511c761fec572a093e833541968635ca011cb71e.tar.gz volse-hubzilla-511c761fec572a093e833541968635ca011cb71e.tar.bz2 volse-hubzilla-511c761fec572a093e833541968635ca011cb71e.zip |
group/community/celebrity pages
Diffstat (limited to 'view/acl_selectors.php')
-rw-r--r-- | view/acl_selectors.php | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/view/acl_selectors.php b/view/acl_selectors.php index 388b75ebb..7ad97dfd2 100644 --- a/view/acl_selectors.php +++ b/view/acl_selectors.php @@ -30,21 +30,24 @@ function group_select($selname,$selclass,$preselected = false,$size = 4) { -function contact_select($selname, $selclass, $preselected = false, $size = 4, $privmail = false) { +function contact_select($selname, $selclass, $preselected = false, $size = 4, $privmail = false, $celeb = false) { $o = ''; // When used for private messages, we limit correspondence to mutual friends and the selector // to one recipient. By default our selector allows multiple selects amongst all contacts. - if($privmail) { + $sql_extra = ''; + + if($privmail || $celeb) { $sql_extra = sprintf(" AND `rel` = %d ", intval(REL_BUD)); - $o .= "<select name=\"$selname\" id=\"$selclass\" class=\"$selclass\" size=\"$size\" >\r\n"; } - else { - $sql_extra = ''; + + if($privmail) + $o .= "<select name=\"$selname\" id=\"$selclass\" class=\"$selclass\" size=\"$size\" >\r\n"; + else $o .= "<select name=\"{$selname}[]\" id=\"$selclass\" class=\"$selclass\" multiple=\"multiple\" size=\"$size\" >\r\n"; - } + $r = q("SELECT `id`, `name`, `url` FROM `contact` WHERE `uid` = %d AND `self` = 0 AND `blocked` = 0 AND `pending` = 0 @@ -73,7 +76,7 @@ function fixacl(&$item) { $item = intval(str_replace(array('<','>'),array('',''),$item)); } -function populate_acl($user = null) { +function populate_acl($user = null,$celeb = false) { $allow_cid = $allow_gid = $deny_cid = $deny_gid = false; @@ -104,7 +107,7 @@ function populate_acl($user = null) { $o .= '</div>'; $o .= '<div id="contact_allow_wrapper">'; $o .= '<label id="acl-allow-contact-label" for="contact_allow" >' . t('Contacts') . '</label>'; - $o .= contact_select('contact_allow','contact_allow',$allow_cid); + $o .= contact_select('contact_allow','contact_allow',$allow_cid,4,false,$celeb); $o .= '</div>'; $o .= '</div>' . "\r\n"; $o .= '<div id="acl-allow-end"></div>' . "\r\n"; @@ -119,7 +122,7 @@ function populate_acl($user = null) { $o .= '</div>'; $o .= '<div id="contact_deny_wrapper" >'; $o .= '<label id="acl-deny-contact-label" for="contact_deny" >' . t('Contacts') . '</label>'; - $o .= contact_select('contact_deny','contact_deny', $deny_cid); + $o .= contact_select('contact_deny','contact_deny', $deny_cid,4,false, $celeb); $o .= '</div>'; $o .= '</div>' . "\r\n"; $o .= '<div id="acl-deny-end"></div>' . "\r\n"; |