fu: Close-up of Fu, bringing a scoop of water to her mouth (Default)
fu ([personal profile] fu) wrote in [site community profile] changelog2010-07-30 01:53 pm

[dw-free] Use external stylesheets by default for official styles

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

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

We 404 on various pages of an openid's journal, but we don't want to return
a 404 for resources such as stylesheets.

Patch by [personal profile] fu.

Files modified:
  • cgi-bin/LJ/User.pm
--------------------------------------------------------------------------------
diff -r 4620690370e7 -r 5a7cd60253f0 cgi-bin/LJ/User.pm
--- a/cgi-bin/LJ/User.pm	Fri Jul 30 06:43:15 2010 -0700
+++ b/cgi-bin/LJ/User.pm	Fri Jul 30 06:53:43 2010 -0700
@@ -8683,7 +8683,8 @@ sub make_journal {
 
     # FIXME: pretty this up at some point, to maybe auto-redirect to
     # the external URL or something, but let's just do this for now
-    if ( $u->is_identity && $view ne "read" ) {
+    # res is a resource, such as an external stylesheet
+    if ( $u->is_identity && ! ( $view eq "read" || $view eq "res" ) ) {
         my $location = $u->openid_identity;
         my $warning = BML::ml( 'error.nojournal.openid', { aopts => "href='$location'", id => $location } );
         return $error->( $warning, "404 Not here" );
--------------------------------------------------------------------------------