aboutsummaryrefslogtreecommitdiffstats
path: root/mod/zfinger.php
diff options
context:
space:
mode:
Diffstat (limited to 'mod/zfinger.php')
-rw-r--r--mod/zfinger.php21
1 files changed, 8 insertions, 13 deletions
diff --git a/mod/zfinger.php b/mod/zfinger.php
index 6b93b3410..54ea52bc9 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,16 +108,15 @@ 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))
+ if(($t) && (($t[0]['abook_my_perms'] & PERMS_W_TAGWALL) && (! ($t[0]['abook_my_perms'] & PERMS_W_STREAM))))
$public_forum = true;
}