Fix next/previous entry logic when encountering members-locked entries
in communities.
Patch by kareila.
diffs (14 lines):
diff -r 4758580ad6f5 -r 5564d0c21ca2 cgi-bin/LJ/Entry.pm
--- a/cgi-bin/LJ/Entry.pm Wed Jul 01 23:38:24 2009 +0800
+++ b/cgi-bin/LJ/Entry.pm Wed Jul 01 15:47:21 2009 +0000
@@ -1773,8 +1773,8 @@ sub get_itemid_near2
if ($remote) {
if ($remote->{'userid'} == $u->{'userid'}) {
$secwhere = ""; # see everything
- } elsif ($remote->{'journaltype'} eq 'P' || $remote->{'journaltype'}
eq 'I') {
- my $gmask = $u->trustmask( $remote );
+ } elsif ( $remote->is_individual ) {
+ my $gmask = $u->is_community ? $remote->member_of( $u ) :
$u->trustmask( $remote );
$secwhere = "AND (security='public' OR (security='usemask' AND
allowmask & $gmask))"
if $gmask;
}
_______________________________________________
dw-changelog mailing list
[email protected]
http://lists.dwscoalition.org/mailman/listinfo/dw-changelog