X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Facl.php;h=fe353d1eb5af75e191d1f09f57e12afc0217ebdc;hb=e2e6b56c448da3a67fa25df118bbb7cbc3239664;hp=07ca096e5bbec2f963b74d5d2d891d788a9088b8;hpb=1aba538c96628468b84136386496ccc69050e810;p=friendica.git diff --git a/mod/acl.php b/mod/acl.php index 07ca096e5b..fe353d1eb5 100644 --- a/mod/acl.php +++ b/mod/acl.php @@ -7,15 +7,17 @@ function acl_init(&$a){ return ""; - $start = (x($_POST,'start')?$_POST['start']:0); - $count = (x($_POST,'count')?$_POST['count']:100); - $search = (x($_POST,'search')?$_POST['search']:""); - $type = (x($_POST,'type')?$_POST['type']:""); + $start = (x($_REQUEST,'start')?$_REQUEST['start']:0); + $count = (x($_REQUEST,'count')?$_REQUEST['count']:100); + $search = (x($_REQUEST,'search')?$_REQUEST['search']:""); + $type = (x($_REQUEST,'type')?$_REQUEST['type']:""); if ($search!=""){ $sql_extra = "AND `name` LIKE '%%".dbesc($search)."%%'"; - $sql_extra2 = "AND (`name` LIKE '%%".dbesc($search)."%%' OR `nick` LIKE '%%".dbesc($search)."%%')"; + $sql_extra2 = "AND (`attag` LIKE '%%".dbesc($search)."%%' OR `name` LIKE '%%".dbesc($search)."%%' OR `nick` LIKE '%%".dbesc($search)."%%')"; + } else { + $sql_extra = $sql_extra2 = ""; } // count groups and contacts @@ -32,7 +34,7 @@ function acl_init(&$a){ $r = q("SELECT COUNT(`id`) AS c FROM `contact` WHERE `uid` = %d AND `self` = 0 AND `blocked` = 0 AND `pending` = 0 - AND `notify` != '' $sql_extra" , + AND `notify` != '' $sql_extra2" , intval(local_user()) ); $contact_count = (int)$r[0]['c']; @@ -60,11 +62,11 @@ function acl_init(&$a){ intval($count) ); - foreach($r as $g){ +// logger('acl: group: ' . $g['name'] . ' members: ' . $g['uids']); $groups[] = array( "type" => "g", - "photo" => "images/default-group-mm.png", + "photo" => "images/twopeople.png", "name" => $g['name'], "id" => intval($g['id']), "uids" => array_map("intval", explode(",",$g['uids'])), @@ -75,7 +77,7 @@ function acl_init(&$a){ if ($type=='' || $type=='c'){ - $r = q("SELECT `id`, `name`, `nick`, `micro`, `network`, `url` FROM `contact` + $r = q("SELECT `id`, `name`, `nick`, `micro`, `network`, `url`, `attag` FROM `contact` WHERE `uid` = %d AND `self` = 0 AND `blocked` = 0 AND `pending` = 0 AND `notify` != '' $sql_extra2 ORDER BY `name` ASC ", @@ -89,7 +91,7 @@ function acl_init(&$a){ "id" => intval($g['id']), "network" => $g['network'], "link" => $g['url'], - "nick" => $g['nick'], + "nick" => ($g['attag']) ? $g['attag'] : $g['nick'], ); }