aboutsummaryrefslogtreecommitdiffstats
path: root/mod/acl.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2015-01-04 14:47:08 -0800
committerfriendica <info@friendica.com>2015-01-04 14:47:08 -0800
commit57d8271ebaaf56d2abdadb9f73deec466ebd590d (patch)
tree29282511c61ab1ea8f79a1c5fe7f1bd66edd022d /mod/acl.php
parentebb1a616849e275111cd24a20d08031aff4c4161 (diff)
downloadvolse-hubzilla-57d8271ebaaf56d2abdadb9f73deec466ebd590d.tar.gz
volse-hubzilla-57d8271ebaaf56d2abdadb9f73deec466ebd590d.tar.bz2
volse-hubzilla-57d8271ebaaf56d2abdadb9f73deec466ebd590d.zip
only check the LHS of xchan_addr for autocomplete, don't match on the hostname.
Diffstat (limited to 'mod/acl.php')
-rw-r--r--mod/acl.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/mod/acl.php b/mod/acl.php
index 8c6eae0b0..c18b56d8b 100644
--- a/mod/acl.php
+++ b/mod/acl.php
@@ -30,7 +30,7 @@ function acl_init(&$a){
if ($search != "") {
$sql_extra = " AND `name` LIKE " . protect_sprintf( "'%" . dbesc($search) . "%'" ) . " ";
- $sql_extra2 = "AND ( xchan_name LIKE " . protect_sprintf( "'%" . dbesc($search) . "%'" ) . " OR xchan_addr LIKE " . protect_sprintf( "'%" . dbesc($search) . "%'" ) . ") ";
+ $sql_extra2 = "AND ( xchan_name LIKE " . protect_sprintf( "'%" . dbesc($search) . "%'" ) . " OR xchan_addr LIKE " . protect_sprintf( "'%" . dbesc($search) . "%@%'" ) . ") ";
// This horrible mess is needed because position also returns 0 if nothing is found. W/ould be MUCH easier if it instead returned a very large value
// Otherwise we could just order by LEAST(POSTION($search IN xchan_name),POSITION($search IN xchan_addr)).