Move up user page noindex check
authorAaron Schulz <aaron@users.mediawiki.org>
Wed, 14 Jan 2009 23:42:57 +0000 (23:42 +0000)
committerAaron Schulz <aaron@users.mediawiki.org>
Wed, 14 Jan 2009 23:42:57 +0000 (23:42 +0000)
includes/Article.php

index eedc331..a2db379 100644 (file)
@@ -780,6 +780,16 @@ class Article {
                        wfProfileOut( __METHOD__ );
                        return;
                }
+               
+               if( $ns == NS_USER || $ns == NS_USER_TALK ) {
+                       # User/User_talk subpages are not modified. (bug 11443)
+                       if( !$this->mTitle->isSubpage() ) {
+                               $block = new Block();
+                               if( $block->load( $this->mTitle->getBaseText() ) ) {
+                                       $wgOut->setRobotpolicy( 'noindex,nofollow' );
+                               }
+                       }
+               }
 
                # Should the parser cache be used?
                $pcache = $this->useParserCache( $oldid );
@@ -853,14 +863,6 @@ class Article {
                                        // for better machine handling of broken links.
                                        $return404 = true;
                                }
-                       } else if( $ns == NS_USER || $ns == NS_USER_TALK ) {
-                               # User/User_talk subpages are not modified. (bug 11443)
-                               if( !$this->mTitle->isSubpage() ) {
-                                       $block = new Block();
-                                       if( $block->load( $this->mTitle->getBaseText() ) ) {
-                                               $wgOut->setRobotpolicy( 'noindex,nofollow' );
-                                       }
-                               }
                        }
 
                        if( $return404 ) {