diff options
author | zotlabs <mike@macgirvin.com> | 2017-11-14 14:50:36 -0800 |
---|---|---|
committer | zotlabs <mike@macgirvin.com> | 2017-11-14 14:50:36 -0800 |
commit | d43542dd7a64136626550ba0569b1939b84b8146 (patch) | |
tree | f19c6f9716fcc9fe72e573d778bb45eb1c397051 /Zotlabs/Module/Acl.php | |
parent | 59caf141d1e271ee4a6e7ab8b66f4070835dde95 (diff) | |
parent | 3c3c0ed34269cecdbda1288eab5b63c664a8859c (diff) | |
download | volse-hubzilla-d43542dd7a64136626550ba0569b1939b84b8146.tar.gz volse-hubzilla-d43542dd7a64136626550ba0569b1939b84b8146.tar.bz2 volse-hubzilla-d43542dd7a64136626550ba0569b1939b84b8146.zip |
Merge branch 'dev' of https://github.com/redmatrix/hubzilla into dev_merge
Diffstat (limited to 'Zotlabs/Module/Acl.php')
-rw-r--r-- | Zotlabs/Module/Acl.php | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/Zotlabs/Module/Acl.php b/Zotlabs/Module/Acl.php index e164875e8..ad1c8b8cd 100644 --- a/Zotlabs/Module/Acl.php +++ b/Zotlabs/Module/Acl.php @@ -176,11 +176,18 @@ class Acl extends \Zotlabs\Web\Controller { $extra_channels_sql = " OR (abook_channel IN ($extra_channels_sql)) and abook_hidden = 0 "; - // Add atokens belonging to the local channel @TODO restrict by search + // Add atokens belonging to the local channel + + if($search) { + $sql_extra_atoken = "AND ( atoken_name LIKE " . protect_sprintf( "'%" . dbesc($search) . "%'" ) . ") "; + } + else { + $sql_extra_atoken = ''; + } $r2 = null; - $r1 = q("select * from atoken where atoken_uid = %d", + $r1 = q("select * from atoken where atoken_uid = %d $sql_extra_atoken", intval(local_channel()) ); |