diff options
author | Fabio Comuni <fabrix.xm@gmail.com> | 2011-01-31 09:54:08 +0100 |
---|---|---|
committer | Fabio Comuni <fabrix.xm@gmail.com> | 2011-01-31 09:54:08 +0100 |
commit | e962561f8d511129d87b5e50eede8e96b2bdfb7c (patch) | |
tree | ce3a0404855e11a59679f4b108433a74e38b3256 /include/acl_selectors.php | |
parent | bf8dadb9700fd0600a38116bf03588883350aab1 (diff) | |
parent | d8877b88d6c26e29019312f02297411817692361 (diff) | |
download | volse-hubzilla-e962561f8d511129d87b5e50eede8e96b2bdfb7c.tar.gz volse-hubzilla-e962561f8d511129d87b5e50eede8e96b2bdfb7c.tar.bz2 volse-hubzilla-e962561f8d511129d87b5e50eede8e96b2bdfb7c.zip |
Merge remote branch 'friendika-master/master'
Diffstat (limited to 'include/acl_selectors.php')
-rw-r--r-- | include/acl_selectors.php | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/include/acl_selectors.php b/include/acl_selectors.php index d0952421e..554782a82 100644 --- a/include/acl_selectors.php +++ b/include/acl_selectors.php @@ -30,7 +30,7 @@ function group_select($selname,$selclass,$preselected = false,$size = 4) { -function contact_select($selname, $selclass, $preselected = false, $size = 4, $privmail = false, $celeb = false) { +function contact_select($selname, $selclass, $preselected = false, $size = 4, $privmail = false, $celeb = false, $privatenet = false) { $o = ''; @@ -43,6 +43,10 @@ function contact_select($selname, $selclass, $preselected = false, $size = 4, $p $sql_extra .= sprintf(" AND `rel` = %d ", intval(REL_BUD)); } + if($privmail || $privatenet) { + $sql_extra .= " AND `network` IN ( 'dfrn' ) "; + } + if($privmail) $o .= "<select name=\"$selname\" id=\"$selclass\" class=\"$selclass\" size=\"$size\" >\r\n"; else @@ -61,11 +65,8 @@ function contact_select($selname, $selclass, $preselected = false, $size = 4, $p $selected = " selected=\"selected\" "; else $selected = ''; - if(($privmail) && ($rr['network'] === 'stat')) - $disabled = ' disabled="true" ' ; - else - $disabled = ''; - $o .= "<option value=\"{$rr['id']}\" $selected $disabled title=\"{$rr['url']}\" >{$rr['name']}</option>\r\n"; + + $o .= "<option value=\"{$rr['id']}\" $selected title=\"{$rr['url']}\" >{$rr['name']}</option>\r\n"; } } @@ -110,7 +111,7 @@ function populate_acl($user = null,$celeb = false) { $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,4,false,$celeb); + $o .= contact_select('contact_allow','contact_allow',$allow_cid,4,false,$celeb,true); $o .= '</div>'; $o .= '</div>' . "\r\n"; $o .= '<div id="acl-allow-end"></div>' . "\r\n"; @@ -125,7 +126,7 @@ function populate_acl($user = null,$celeb = false) { $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,4,false, $celeb); + $o .= contact_select('contact_deny','contact_deny', $deny_cid,4,false, $celeb,true); $o .= '</div>'; $o .= '</div>' . "\r\n"; $o .= '<div id="acl-deny-end"></div>' . "\r\n"; |