From b3f4d3b39b918ede99e6945e32339eb5565e0aeb Mon Sep 17 00:00:00 2001 From: Jens Frank Date: Thu, 7 Jul 2005 05:02:09 +0000 Subject: [PATCH] (bug 2416) Don't allow search engine robots to index or follow nonexisting articles --- RELEASE-NOTES | 1 + includes/Article.php | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 26749ca875..1b6ec2cf54 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -512,6 +512,7 @@ of MediaWiki:Newpagetext) to &action=edit, if page is new. * Massive update for Arab (ar) language using Wikipédia * (bug 1560) Massive update for Kurdish (ku) language using Wikipédia * (bug 2709) Some messages were not read from database +* (bug 2416) Don't allow search engine robots to index or follow nonexisting articles === Caveats === diff --git a/includes/Article.php b/includes/Article.php index 5d239e13c3..6e5e453e8f 100644 --- a/includes/Article.php +++ b/includes/Article.php @@ -81,7 +81,7 @@ class Article { * @return Return the text of this revision */ function getContent( $noredir ) { - global $wgRequest, $wgUser; + global $wgRequest, $wgUser, $wgOut; # Get variables from query string :P $action = $wgRequest->getText( 'action', 'view' ); @@ -112,7 +112,7 @@ class Article { return ''; } wfProfileOut( $fname ); - + $wgOut->setRobotpolicy( 'noindex,nofollow' ); return wfMsg( 'noarticletext' ); } else { $this->loadContent( $noredir ); -- 2.20.1