From: Brion Vibber Date: Thu, 8 Dec 2005 02:38:46 +0000 (+0000) Subject: * (bug 4212) Skip redundant meta-robots tag for default settings X-Git-Tag: 1.6.0~989 X-Git-Url: http://git.cyclocoop.org/%24href?a=commitdiff_plain;h=6739f7f88f63762196966f9bd448f0929a547f61;p=lhc%2Fweb%2Fwiklou.git * (bug 4212) Skip redundant meta-robots tag for default settings --- diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 79c174adb9..55cd1b4ca1 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -305,6 +305,7 @@ fully support the editing toolbar, but was found to be too confusing. * (bug 4207) Wrong image size when using 100x200px syntax to scale image up patch by David Benbennick * (bug 4214) Skip redundant action text inserts into the HTML +* (bug 4212) Skip redundant meta-robots tag for default settings === Caveats === diff --git a/includes/OutputPage.php b/includes/OutputPage.php index 56f0aa32ac..d75ba27b0a 100644 --- a/includes/OutputPage.php +++ b/includes/OutputPage.php @@ -900,9 +900,13 @@ class OutputPage { } $ret .= "<meta $a=\"{$tag[0]}\" content=\"{$tag[1]}\" />\n"; } + $p = $this->mRobotpolicy; - if ( '' == $p ) { $p = 'index,follow'; } - $ret .= "<meta name=\"robots\" content=\"$p\" />\n"; + if( $p !== '' && $p != 'index,follow' ) { + // http://www.robotstxt.org/wc/meta-user.html + // Only show if it's different from the default robots policy + $ret .= "<meta name=\"robots\" content=\"$p\" />\n"; + } if ( count( $this->mKeywords ) > 0 ) { $strip = array(