diff options
author | redmatrix <git@macgirvin.com> | 2016-07-14 20:26:22 -0700 |
---|---|---|
committer | redmatrix <git@macgirvin.com> | 2016-07-14 20:26:22 -0700 |
commit | f70f4a4e8558a6d715eb7ca0d02ac38753094068 (patch) | |
tree | a8449b40a49669b3d008df144db749080f87fbf5 /Zotlabs | |
parent | f3eb9af046b155c53a194db6104a24b6d6756072 (diff) | |
download | volse-hubzilla-f70f4a4e8558a6d715eb7ca0d02ac38753094068.tar.gz volse-hubzilla-f70f4a4e8558a6d715eb7ca0d02ac38753094068.tar.bz2 volse-hubzilla-f70f4a4e8558a6d715eb7ca0d02ac38753094068.zip |
add zat to acl
Diffstat (limited to 'Zotlabs')
-rw-r--r-- | Zotlabs/Module/Acl.php | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/Zotlabs/Module/Acl.php b/Zotlabs/Module/Acl.php index f33e257f4..c8a4fdd7c 100644 --- a/Zotlabs/Module/Acl.php +++ b/Zotlabs/Module/Acl.php @@ -130,13 +130,38 @@ class Acl extends \Zotlabs\Web\Controller { if(local_channel()) { if($extra_channels_sql != '') $extra_channels_sql = " OR (abook_channel IN ($extra_channels_sql)) and abook_hidden = 0 "; + + $r2 = null; + + $r1 = q("select * from atoken where atoken_uid = %d", + intval(local_channel()) + ); + if($r1) { + $r2 = array(); + foreach($r1 as $rr) { + $r2[] = [ + 'id' => 'a' . $rr['atoken_id'] , + 'hash' => $rr['atoken_uid'] . '.' . $rr['atoken_name'], + 'name' => $rr['atoken_name'], + 'micro' => get_default_profile_photo(48), + 'url' => z_root(), + 'nick' => t('guest:') . $rr['atoken_name'], + 'abook_their_perms' => 0, + 'abook_flags' => 0, + 'abook_self' => 0 + ]; + } + } + $r = q("SELECT abook_id as id, xchan_hash as hash, xchan_name as name, xchan_photo_s as micro, xchan_url as url, xchan_addr as nick, abook_their_perms, abook_flags, abook_self FROM abook left join xchan on abook_xchan = xchan_hash WHERE (abook_channel = %d $extra_channels_sql) AND abook_blocked = 0 and abook_pending = 0 and xchan_deleted = 0 $sql_extra2 order by $order_extra2 xchan_name asc" , intval(local_channel()) ); - + if($r2) + $r = array_merge($r2,$r); + } else { // Visitors $r = q("SELECT xchan_hash as id, xchan_hash as hash, xchan_name as name, xchan_photo_s as micro, xchan_url as url, xchan_addr as nick, 0 as abook_their_perms, 0 as abook_flags, 0 as abook_self |