r45760 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r45759‎ | r45760 | r45761 >
Date:23:42, 14 January 2009
Author:aaron
Status:ok (Comments)
Tags:
Comment:
Move up user page noindex check
Modified paths:
  • /trunk/phase3/includes/Article.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Article.php
@@ -780,6 +780,16 @@
781781 wfProfileOut( __METHOD__ );
782782 return;
783783 }
 784+
 785+ if( $ns == NS_USER || $ns == NS_USER_TALK ) {
 786+ # User/User_talk subpages are not modified. (bug 11443)
 787+ if( !$this->mTitle->isSubpage() ) {
 788+ $block = new Block();
 789+ if( $block->load( $this->mTitle->getBaseText() ) ) {
 790+ $wgOut->setRobotpolicy( 'noindex,nofollow' );
 791+ }
 792+ }
 793+ }
784794
785795 # Should the parser cache be used?
786796 $pcache = $this->useParserCache( $oldid );
@@ -853,14 +863,6 @@
854864 // for better machine handling of broken links.
855865 $return404 = true;
856866 }
857 - } else if( $ns == NS_USER || $ns == NS_USER_TALK ) {
858 - # User/User_talk subpages are not modified. (bug 11443)
859 - if( !$this->mTitle->isSubpage() ) {
860 - $block = new Block();
861 - if( $block->load( $this->mTitle->getBaseText() ) ) {
862 - $wgOut->setRobotpolicy( 'noindex,nofollow' );
863 - }
864 - }
865867 }
866868
867869 if( $return404 ) {

Comments

#Comment by Brion VIBBER (talk | contribs)   21:45, 20 January 2009

resolves r45712

Status & tagging log