aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2018-05-30 17:30:17 -0700
committerzotlabs <mike@macgirvin.com>2018-05-30 17:30:17 -0700
commitfc31ecdab0abdd5ca83723c2c1da2f711016c274 (patch)
treeb283e254658ecce4c287fa413db6fbe8ac3903dd
parent7d088c8d565e0ac88f6640b69518a1aba323b20f (diff)
downloadvolse-hubzilla-fc31ecdab0abdd5ca83723c2c1da2f711016c274.tar.gz
volse-hubzilla-fc31ecdab0abdd5ca83723c2c1da2f711016c274.tar.bz2
volse-hubzilla-fc31ecdab0abdd5ca83723c2c1da2f711016c274.zip
autocomplete private mail addresses based on substring in either the name or webbie (prevously required an '@' to trigger a webbie search)
-rw-r--r--Zotlabs/Module/Acl.php3
1 files changed, 1 insertions, 2 deletions
diff --git a/Zotlabs/Module/Acl.php b/Zotlabs/Module/Acl.php
index 2678aeb7a..7b52e88b5 100644
--- a/Zotlabs/Module/Acl.php
+++ b/Zotlabs/Module/Acl.php
@@ -94,8 +94,7 @@ class Acl extends \Zotlabs\Web\Controller {
. " then POSITION('" . protect_sprintf(dbesc($search))
. "' IN xchan_name) else position('" . protect_sprintf(dbesc(punify($search))) . "' IN xchan_addr) end, ";
- $col = ((strpos($search,'@') !== false) ? 'xchan_addr' : 'xchan_name' );
- $sql_extra3 = "AND $col like " . protect_sprintf( "'%" . dbesc(($col === 'xchan_addr') ? punify($search) : $search) . "%'" ) . " ";
+ $sql_extra3 = "AND ( xchan_addr like " . protect_sprintf( "'%" . dbesc(punify($search)) . "%'" ) . " OR xchan_name like " . protect_sprintf( "'%" . dbesc($search) . "%'" ) . " ) ";
}
else {