aboutsummaryrefslogtreecommitdiffstats
path: root/mod/acl.php
diff options
context:
space:
mode:
authorhabeascodice <habeascodice@federated.social>2014-11-01 03:04:11 -0700
committerhabeascodice <habeascodice@federated.social>2014-11-01 03:04:11 -0700
commit31376de0665091f2dba04755562ccd238d57a13c (patch)
treeae59c8697b9fd20c33aeaf8acb3a698b63e9657b /mod/acl.php
parentc854f8c238da2df08b52249142ad24ef66e422d1 (diff)
parent50c16c394fe2d966c62d30930600212a4e33303e (diff)
downloadvolse-hubzilla-31376de0665091f2dba04755562ccd238d57a13c.tar.gz
volse-hubzilla-31376de0665091f2dba04755562ccd238d57a13c.tar.bz2
volse-hubzilla-31376de0665091f2dba04755562ccd238d57a13c.zip
Merge remote branch 'upstream/master'
Diffstat (limited to 'mod/acl.php')
-rw-r--r--mod/acl.php12
1 files changed, 6 insertions, 6 deletions
diff --git a/mod/acl.php b/mod/acl.php
index 5658a05c5..01f5103f1 100644
--- a/mod/acl.php
+++ b/mod/acl.php
@@ -11,7 +11,7 @@ function acl_init(&$a){
$count = (x($_REQUEST,'count')?$_REQUEST['count']:100);
$search = (x($_REQUEST,'search')?$_REQUEST['search']:"");
$type = (x($_REQUEST,'type')?$_REQUEST['type']:"");
-
+ $noforums = (x($_REQUEST,'n') ? $_REQUEST['n'] : false);
// For use with jquery.autocomplete for private mail completion
@@ -87,7 +87,7 @@ function acl_init(&$a){
$contact_count = (int)$r[0]['c'];
}
- elseif ($type == 'a') {
+ elseif (($type == 'a')||($type == 'p')) {
// autocomplete for Contacts
@@ -168,7 +168,7 @@ function acl_init(&$a){
intval(XCHAN_FLAGS_DELETED)
);
}
- elseif($type == 'a') {
+ elseif(($type == 'a') || ($type == 'p')) {
$r = q("SELECT abook_id as id, xchan_name as name, xchan_hash as hash, xchan_addr as nick, xchan_photo_s as micro, xchan_network as network, xchan_url as url, xchan_addr as attag , abook_their_perms FROM abook left join xchan on abook_xchan = xchan_hash
WHERE abook_channel = %d
and not (xchan_flags & %d)
@@ -204,7 +204,7 @@ function acl_init(&$a){
$r = array();
- if($type == 'm' || $type == 'a') {
+ if($type == 'm' || $type == 'a' || $type == 'p') {
$x = array();
$x['query'] = $search;
$x['photos'] = array();
@@ -216,7 +216,7 @@ function acl_init(&$a){
$x['photos'][] = $g['micro'];
$x['links'][] = $g['url'];
$x['suggestions'][] = $g['name'];
- $x['data'][] = $g['id'];
+ $x['data'][] = (($type === 'p') ? '@' . str_replace(' ','_',$g['name']) : $g['id']);
}
}
echo json_encode($x);
@@ -230,7 +230,7 @@ function acl_init(&$a){
if(strpos($g['hash'],'/'))
continue;
- if(($g['abook_their_perms'] & PERMS_W_TAGWALL) && $type == 'c') {
+ if(($g['abook_their_perms'] & PERMS_W_TAGWALL) && $type == 'c' && (! $noforums)) {
$contacts[] = array(
"type" => "c",
"photo" => "images/twopeople.png",