From 4674fa8fa6024d1ae6bd626f3f9441e0116484ee Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Wed, 7 Jun 2006 00:21:39 +0000 Subject: [PATCH] * (bug 4280) Use 'noindex,nofollow' instead of 'noindex,follow' for default meta robots tag on diff view and special pages. Should reduce impact of robots on scrolling special pages, diffs etc on sites where robots.txt doesn't forbid access. --- RELEASE-NOTES | 4 ++++ includes/Article.php | 6 +++--- includes/DifferenceEngine.php | 2 +- includes/SpecialPage.php | 4 ++-- 4 files changed, 10 insertions(+), 6 deletions(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 488aaa66c4..bb1457fc8b 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -450,6 +450,10 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN to
.
is perfectly valid in the target doctype (XHTML 1.0 Transitional), while the replacement didn't catch all cases and could even result in invalid output from valid input. +* (bug 4280) Use 'noindex,nofollow' instead of 'noindex,follow' for default + meta robots tag on diff view and special pages. Should reduce impact of + robots on scrolling special pages, diffs etc on sites where robots.txt + doesn't forbid access. == Compatibility == diff --git a/includes/Article.php b/includes/Article.php index 4da96b81fa..1162a9c1d5 100644 --- a/includes/Article.php +++ b/includes/Article.php @@ -1438,7 +1438,7 @@ class Article { */ function markpatrolled() { global $wgOut, $wgRequest, $wgUseRCPatrol, $wgUser; - $wgOut->setRobotpolicy( 'noindex,follow' ); + $wgOut->setRobotpolicy( 'noindex,nofollow' ); # Check RC patrol config. option if( !$wgUseRCPatrol ) { @@ -1487,7 +1487,7 @@ class Article { if( $this->doWatch() ) { $wgOut->setPagetitle( wfMsg( 'addedwatch' ) ); - $wgOut->setRobotpolicy( 'noindex,follow' ); + $wgOut->setRobotpolicy( 'noindex,nofollow' ); $link = $this->mTitle->getPrefixedText(); $text = wfMsg( 'addedwatchtext', $link ); @@ -1535,7 +1535,7 @@ class Article { if( $this->doUnwatch() ) { $wgOut->setPagetitle( wfMsg( 'removedwatch' ) ); - $wgOut->setRobotpolicy( 'noindex,follow' ); + $wgOut->setRobotpolicy( 'noindex,nofollow' ); $link = $this->mTitle->getPrefixedText(); $text = wfMsg( 'removedwatchtext', $link ); diff --git a/includes/DifferenceEngine.php b/includes/DifferenceEngine.php index ac25fc6f1e..490a889b6e 100644 --- a/includes/DifferenceEngine.php +++ b/includes/DifferenceEngine.php @@ -138,7 +138,7 @@ CONTROL; $wgOut->setPageTitle( $oldTitle . ', ' . $newTitle ); } $wgOut->setSubtitle( wfMsg( 'difference' ) ); - $wgOut->setRobotpolicy( 'noindex,follow' ); + $wgOut->setRobotpolicy( 'noindex,nofollow' ); if ( !( $this->mOldPage->userCanRead() && $this->mNewPage->userCanRead() ) ) { $wgOut->loginToUse(); diff --git a/includes/SpecialPage.php b/includes/SpecialPage.php index 8dc51c1228..ac7e0e275f 100644 --- a/includes/SpecialPage.php +++ b/includes/SpecialPage.php @@ -291,7 +291,7 @@ class SpecialPage $retVal = $redir; } else { $wgOut->setArticleRelated( false ); - $wgOut->setRobotpolicy( 'noindex,follow' ); + $wgOut->setRobotpolicy( 'noindex,nofollow' ); $wgOut->setStatusCode( 404 ); $wgOut->errorpage( 'nosuchspecialpage', 'nospecialpagetext' ); $retVal = false; @@ -428,7 +428,7 @@ class SpecialPage function setHeaders() { global $wgOut; $wgOut->setArticleRelated( false ); - $wgOut->setRobotPolicy( "noindex,follow" ); + $wgOut->setRobotPolicy( "noindex,nofollow" ); $wgOut->setPageTitle( $this->getDescription() ); } -- 2.20.1