aboutsummaryrefslogtreecommitdiffstats
path: root/mod
diff options
context:
space:
mode:
authorFabio Comuni <fabrix.xm@gmail.com>2011-10-25 15:01:58 +0200
committerFabio Comuni <fabrix.xm@gmail.com>2011-10-25 15:01:58 +0200
commitbcb672e7ff859168b639ffffc38553bbcf7e918c (patch)
treeea969ff32e9dbf1c4cd0d898ec02b9802bec9c7f /mod
parentafce790e56ba7cd4c5c049e7c3a9aac20846981e (diff)
downloadvolse-hubzilla-bcb672e7ff859168b639ffffc38553bbcf7e918c.tar.gz
volse-hubzilla-bcb672e7ff859168b639ffffc38553bbcf7e918c.tar.bz2
volse-hubzilla-bcb672e7ff859168b639ffffc38553bbcf7e918c.zip
autocomplete contacts nickname while writting in a comment box.
Diffstat (limited to 'mod')
-rw-r--r--mod/acl.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/mod/acl.php b/mod/acl.php
index f2d2456a6..d87c8de77 100644
--- a/mod/acl.php
+++ b/mod/acl.php
@@ -13,6 +13,7 @@ function acl_init(&$a){
if ($search!=""){
$sql_extra = "AND `name` LIKE '%%".dbesc($search)."%%'";
+ $sql_extra2 = "AND (`name` LIKE '%%".dbesc($search)."%%' OR `nick` LIKE '%%".dbesc($search)."%%')";
}
// count groups and contacts
@@ -59,9 +60,9 @@ function acl_init(&$a){
}
- $r = q("SELECT `id`, `name`, `micro`, `network`, `url` FROM `contact`
+ $r = q("SELECT `id`, `name`, `nick`, `micro`, `network`, `url` FROM `contact`
WHERE `uid` = %d AND `self` = 0 AND `blocked` = 0 AND `pending` = 0 AND `notify` != ''
- $sql_extra
+ $sql_extra2
ORDER BY `name` ASC ",
intval(local_user())
);
@@ -73,6 +74,7 @@ function acl_init(&$a){
"id" => intval($g['id']),
"network" => $g['network'],
"link" => $g['url'],
+ "nick" => $g['nick'],
);
}