From: Jens Frank Date: Thu, 7 Jul 2005 05:02:09 +0000 (+0000) Subject: (bug 2416) Don't allow search engine robots to index or follow nonexisting articles X-Git-Tag: 1.5.0beta3~2 X-Git-Url: https://git.cyclocoop.org/%7B%24admin_url%7Dmembres/Main?a=commitdiff_plain;h=b3f4d3b39b918ede99e6945e32339eb5565e0aeb;p=lhc%2Fweb%2Fwiklou.git (bug 2416) Don't allow search engine robots to index or follow nonexisting articles --- 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 );