diff options
author | friendica <info@friendica.com> | 2014-09-14 22:43:56 -0700 |
---|---|---|
committer | friendica <info@friendica.com> | 2014-09-14 22:43:56 -0700 |
commit | ea8a01791e521a9ae4ea211e1b2e152b27a0486c (patch) | |
tree | b39c7fef325da1299603c61777fa0d5233eb4975 /mod | |
parent | 0dc33900b6799681683fd02f597e95acbd58e960 (diff) | |
download | volse-hubzilla-ea8a01791e521a9ae4ea211e1b2e152b27a0486c.tar.gz volse-hubzilla-ea8a01791e521a9ae4ea211e1b2e152b27a0486c.tar.bz2 volse-hubzilla-ea8a01791e521a9ae4ea211e1b2e152b27a0486c.zip |
allow the site to designate an admin channel that's visible to the outside world (via siteinfo/json). Otherwise we'll use the default channel of any accounts that have the account admin role.
Diffstat (limited to 'mod')
-rw-r--r-- | mod/siteinfo.php | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/mod/siteinfo.php b/mod/siteinfo.php index 061989413..01355a51d 100644 --- a/mod/siteinfo.php +++ b/mod/siteinfo.php @@ -13,7 +13,13 @@ function siteinfo_init(&$a) { if($r) { $admin = array(); foreach($r as $rr) { - $admin[] = array( 'name' => $rr['channel_name'], 'address' => $rr['channel_address'] . '@' . get_app()->get_hostname(), 'channel' => z_root() . '/channel/' . $rr['channel_address']); + if($rr['channel_pageflags'] & PAGE_HUBADMIN) + $admin[] = array( 'name' => $rr['channel_name'], 'address' => $rr['channel_address'] . '@' . get_app()->get_hostname(), 'channel' => z_root() . '/channel/' . $rr['channel_address']); + } + if(! $admin) { + foreach($r as $rr) { + $admin[] = array( 'name' => $rr['channel_name'], 'address' => $rr['channel_address'] . '@' . get_app()->get_hostname(), 'channel' => z_root() . '/channel/' . $rr['channel_address']); + } } } else { |