diff options
author | Mario Vavti <mario@mariovavti.com> | 2017-11-13 10:08:51 +0100 |
---|---|---|
committer | Mario Vavti <mario@mariovavti.com> | 2017-11-13 10:08:51 +0100 |
commit | 217a684e5f0399683b191e7fa9b1a3781fb21196 (patch) | |
tree | 72b14cceeffd2e9c2dd6877bc5b00d6ca183e7dc /Zotlabs/Module | |
parent | 7b6ddeb859288a87573b922dcce086de21189f8c (diff) | |
download | volse-hubzilla-217a684e5f0399683b191e7fa9b1a3781fb21196.tar.gz volse-hubzilla-217a684e5f0399683b191e7fa9b1a3781fb21196.tar.bz2 volse-hubzilla-217a684e5f0399683b191e7fa9b1a3781fb21196.zip |
also filter atokens on acl search
Diffstat (limited to 'Zotlabs/Module')
-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()) ); |