diff options
Diffstat (limited to 'mod/zfinger.php')
-rw-r--r-- | mod/zfinger.php | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/mod/zfinger.php b/mod/zfinger.php index 6b93b3410..ba80fc9b6 100644 --- a/mod/zfinger.php +++ b/mod/zfinger.php @@ -74,14 +74,10 @@ function zfinger_init(&$a) { */ $r = q("select channel.*, xchan.* from channel left join xchan on channel_hash = xchan_hash - where ( channel_pageflags & %d )>0 order by channel_id limit 1", - intval(PAGE_SYSTEM) - ); + where channel_system = 1 order by channel_id limit 1"); if(! $r) { $r = q("select channel.*, xchan.* from channel left join xchan on channel_hash = xchan_hash - where not ( channel_pageflags & %d )>0 order by channel_id limit 1", - intval(PAGE_REMOVED) - ); + where channel_removed = 0 order by channel_id limit 1"); } } } @@ -99,12 +95,12 @@ function zfinger_init(&$a) { $id = $e['channel_id']; - $sys_channel = (($e['channel_pageflags'] & PAGE_SYSTEM) ? true : false); + $sys_channel = (intval($e['channel_system']) ? true : false); $special_channel = (($e['channel_pageflags'] & PAGE_PREMIUM) ? true : false); $adult_channel = (($e['channel_pageflags'] & PAGE_ADULT) ? true : false); $censored = (($e['channel_pageflags'] & PAGE_CENSORED) ? true : false); $searchable = (($e['channel_pageflags'] & PAGE_HIDDEN) ? false : true); - $deleted = (($e['xchan_flags'] & XCHAN_FLAGS_DELETED) ? true : false); + $deleted = (intval($e['xchan_deleted']) ? true : false); if($deleted || $censored || $sys_channel) $searchable = false; @@ -112,14 +108,13 @@ function zfinger_init(&$a) { $public_forum = false; $role = get_pconfig($e['channel_id'],'system','permissions_role'); - if($role === 'forum') { + if($role === 'forum' || $role === 'repository') { $public_forum = true; } else { // check if it has characteristics of a public forum based on custom permissions. - $t = q("select abook_my_perms from abook where abook_channel = %d and (abook_flags & %d)>0 limit 1", - intval($e['channel_id']), - intval(ABOOK_FLAG_SELF) + $t = q("select abook_my_perms from abook where abook_channel = %d and abook_self = 1 limit 1", + intval($e['channel_id']) ); if($t && ($t[0]['abook_my_perms'] & PERMS_W_TAGWALL)) $public_forum = true; |