aboutsummaryrefslogtreecommitdiffstats
path: root/mod/acl.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2012-10-24 19:13:29 -0700
committerfriendica <info@friendica.com>2012-10-24 19:13:29 -0700
commitceeb4db6e304c26ebe56311743eb9baca69f7066 (patch)
treef0707fdd2e1ed786a39f2e0491f275fd2e3982a3 /mod/acl.php
parent2b95ce9f07bcf2d85eeb410f6d9bc4b3f2b54b86 (diff)
downloadvolse-hubzilla-ceeb4db6e304c26ebe56311743eb9baca69f7066.tar.gz
volse-hubzilla-ceeb4db6e304c26ebe56311743eb9baca69f7066.tar.bz2
volse-hubzilla-ceeb4db6e304c26ebe56311743eb9baca69f7066.zip
Give the UI a little love after all the backend mods
Diffstat (limited to 'mod/acl.php')
-rw-r--r--mod/acl.php21
1 files changed, 17 insertions, 4 deletions
diff --git a/mod/acl.php b/mod/acl.php
index f3e46efa5..51aa7651b 100644
--- a/mod/acl.php
+++ b/mod/acl.php
@@ -4,8 +4,6 @@
require_once("include/acl_selectors.php");
function acl_init(&$a){
- if(!local_user())
- return "";
$start = (x($_REQUEST,'start')?$_REQUEST['start']:0);
@@ -22,12 +20,19 @@ function acl_init(&$a){
$search = $_REQUEST['query'];
}
+logger("acl: $search");
+
+ if(! (local_user() || $type == 'x'))
+ return "";
+
+
if ($search!=""){
$sql_extra = "AND `name` LIKE '%%".dbesc($search)."%%'";
$sql_extra2 = "AND (`attag` LIKE '%%".dbesc($search)."%%' OR `name` LIKE '%%".dbesc($search)."%%' OR `nick` LIKE '%%".dbesc($search)."%%')";
+ $sql_extra3 = "AND ( xchan_name like '%%" . dbesc($search) . "%%' )";
} else {
- $sql_extra = $sql_extra2 = "";
+ $sql_extra = $sql_extra2 = $sql_extra3 = "";
}
// count groups and contacts
@@ -142,11 +147,19 @@ function acl_init(&$a){
intval(local_user())
);
}
+ elseif($type == 'x') {
+ $r = q("SELECT xchan_name as id, xchan_name as name, xchan_photo_s as micro, xchan_profile as url from xchan
+ where 1
+ $sql_extra3
+ ORDER BY `xchan_name` ASC ",
+ intval(local_user())
+ );
+ }
else
$r = array();
- if($type == 'm' || $type == 'a') {
+ if($type == 'm' || $type == 'a' || $type == 'x') {
$x = array();
$x['query'] = $search;
$x['photos'] = array();