[dw-free] Locked community entries do not show up on the daypage/monthpage
[commit: http://hg.dwscoalition.org/dw-free/rev/9dda78055ea0]
http://bugs.dwscoalition.org/show_bug.cgi?id=483
Update get_daycounts to work with community membership changes.
Patch by
mark.
Files modified:
http://bugs.dwscoalition.org/show_bug.cgi?id=483
Update get_daycounts to work with community membership changes.
Patch by
![[staff profile]](https://www.dreamwidth.org/img/silk/identity/user_staff.png)
Files modified:
- cgi-bin/LJ/User.pm
-------------------------------------------------------------------------------- diff -r 87c024c4d0e8 -r 9dda78055ea0 cgi-bin/LJ/User.pm --- a/cgi-bin/LJ/User.pm Sun Mar 15 06:24:30 2009 +0000 +++ b/cgi-bin/LJ/User.pm Sun Mar 15 06:38:24 2009 +0000 @@ -8130,8 +8130,18 @@ sub get_daycounts $secwhere = ""; # see everything $memkind = 'a'; # all } elsif ($remote->{'journaltype'} eq 'P') { - my $gmask = $u->trustmask( $remote ); - if ($gmask) { + + # if we're viewing a community, we intuit the security mask from the membership + my $gmask = 0; + if ( $u->is_community ) { + $gmask = 1 + if $remote->member_of( $u ); + + } else { + $gmask = $u->trustmask( $remote ); + } + + if ( $gmask ) { $secwhere = "AND (security='public' OR (security='usemask' AND allowmask & $gmask))"; $memkind = 'g' . $gmask; # friends case: allowmask == gmask == 1 } --------------------------------------------------------------------------------