From f47f590c431cf93bc6855631c564bc73729bf262 Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Tue, 13 Jan 2009 18:37:46 +0000 Subject: [PATCH] (bug 11443) Auto-noindex user/user talk pages for blocked users --- includes/Article.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/includes/Article.php b/includes/Article.php index c4135c37b4..eedc3310b2 100644 --- a/includes/Article.php +++ b/includes/Article.php @@ -853,7 +853,15 @@ 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 ) { $wgRequest->response()->header( "HTTP/1.x 404 Not Found" ); -- 2.20.1