From a8f6bfee70c63acdd1be5f6e02b8f18aa0cf804d Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Wed, 14 Jan 2009 23:42:57 +0000 Subject: [PATCH] Move up user page noindex check --- includes/Article.php | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/includes/Article.php b/includes/Article.php index eedc3310b2..a2db379629 100644 --- a/includes/Article.php +++ b/includes/Article.php @@ -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 ) { -- 2.20.1