fu: Close-up of Fu, bringing a scoop of water to her mouth (Default)
fu ([personal profile] fu) wrote in [site community profile] changelog2011-01-04 07:16 am

[dw-free] ViewEntryStyle/ViewJournalStyle settings causing errors on /manage/settings when logged ou

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

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

Return early when logged out.

Patch by [personal profile] fu.

Files modified:
  • cgi-bin/DW/Setting/ViewEntryStyle.pm
  • cgi-bin/DW/Setting/ViewJournalStyle.pm
--------------------------------------------------------------------------------
diff -r aed67c564016 -r b47b8cee6c96 cgi-bin/DW/Setting/ViewEntryStyle.pm
--- a/cgi-bin/DW/Setting/ViewEntryStyle.pm	Tue Jan 04 15:05:28 2011 +0800
+++ b/cgi-bin/DW/Setting/ViewEntryStyle.pm	Tue Jan 04 15:15:28 2011 +0800
@@ -23,6 +23,7 @@ sub should_render {
 sub should_render {
     my ( $class, $u ) = @_;
 
+    return 0 unless $u;
     return $u->is_community ? 0 : 1;
 }
 
diff -r aed67c564016 -r b47b8cee6c96 cgi-bin/DW/Setting/ViewJournalStyle.pm
--- a/cgi-bin/DW/Setting/ViewJournalStyle.pm	Tue Jan 04 15:05:28 2011 +0800
+++ b/cgi-bin/DW/Setting/ViewJournalStyle.pm	Tue Jan 04 15:15:28 2011 +0800
@@ -23,6 +23,7 @@ sub should_render {
 sub should_render {
     my ( $class, $u ) = @_;
 
+    return 0 unless $u;
     return $u->is_community ? 0 : 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