afuna: Cat under a blanket. Text: "Cats are just little people with Fur and Fangs" (Default)
afuna ([personal profile] afuna) wrote in [site community profile] changelog2009-06-27 02:21 pm

[dw-free] suspended journals shouldn't display adult content check

[commit: http://hg.dwscoalition.org/dw-free/rev/506fd96c8c0c]

http://bugs.dwscoalition.org/show_bug.cgi?id=340

When viewing a deleted/suspended journal, show the error message, not the
adult content check.

Patch by [personal profile] afuna.

Files modified:
  • cgi-bin/Apache/LiveJournal.pm
--------------------------------------------------------------------------------
diff -r 24d531b41e6a -r 506fd96c8c0c cgi-bin/Apache/LiveJournal.pm
--- a/cgi-bin/Apache/LiveJournal.pm	Sat Jun 27 12:51:08 2009 +0000
+++ b/cgi-bin/Apache/LiveJournal.pm	Sat Jun 27 14:20:37 2009 +0000
@@ -491,9 +491,13 @@ sub trans
             }
 
             # we should show the page (no interstitial) if:
+            # the viewed user is deleted / suspended OR
             # the remote user owns the journal we're viewing OR
             # the remote user posted the entry we're viewing
-            my $should_show_page = $remote && ($remote->can_manage($u) || ($entry && $remote->equals($poster)));
+            my $should_show_page = ! $u->is_visible || 
+                                   ( $remote && 
+                                       ( $remote->can_manage( $u ) || ( $entry && $remote->equals( $poster ) ) )
+                                   );
 
             my %journal_pages = (
                 read => 1,
--------------------------------------------------------------------------------

Post a comment in response:

This account has disabled anonymous posting.
If you don't have an account you can create one now.
HTML doesn't work in the subject.
More info about formatting

If you are unable to use this captcha for any reason, please contact us by email at support@dreamwidth.org