aboutsummaryrefslogtreecommitdiffstats
path: root/include/acl_selectors.php
diff options
context:
space:
mode:
authorfabrixxm <fabrix.xm@gmail.com>2011-02-01 07:18:23 +0100
committerfabrixxm <fabrix.xm@gmail.com>2011-02-01 07:18:23 +0100
commit0bec0fc5fb5bfb02a80c6a84581d9daeb9f17813 (patch)
tree26afc64e0e9f7b1b240798bc457d4aa3c5fe5614 /include/acl_selectors.php
parente7d87e4ab3086b7cc10e92bfee769179f80a4d0d (diff)
parent7dbdf8e6faf082e962772b76511f0fd24b6227cc (diff)
downloadvolse-hubzilla-0bec0fc5fb5bfb02a80c6a84581d9daeb9f17813.tar.gz
volse-hubzilla-0bec0fc5fb5bfb02a80c6a84581d9daeb9f17813.tar.bz2
volse-hubzilla-0bec0fc5fb5bfb02a80c6a84581d9daeb9f17813.zip
Merge branch 'friendika-master'
Diffstat (limited to 'include/acl_selectors.php')
-rw-r--r--include/acl_selectors.php22
1 files changed, 13 insertions, 9 deletions
diff --git a/include/acl_selectors.php b/include/acl_selectors.php
index d0952421e..269dc3e34 100644
--- a/include/acl_selectors.php
+++ b/include/acl_selectors.php
@@ -17,8 +17,9 @@ function group_select($selname,$selclass,$preselected = false,$size = 4) {
$selected = " selected=\"selected\" ";
else
$selected = '';
+ $trimmed = substr($rr['name'],0,12);
- $o .= "<option value=\"{$rr['id']}\" $selected >{$rr['name']}</option>\r\n";
+ $o .= "<option value=\"{$rr['id']}\" $selected title=\"{$rr['name']}\" >$trimmed</option>\r\n";
}
}
@@ -30,7 +31,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 +44,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 +66,10 @@ 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";
+
+ $trimmed = substr($rr['name'],0,22);
+
+ $o .= "<option value=\"{$rr['id']}\" $selected title=\"{$rr['name']}|{$rr['url']}\" >$trimmed</option>\r\n";
}
}
@@ -110,7 +114,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 +129,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";