r22615 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r22614‎ | r22615 | r22616 >
Date:23:09, 31 May 2007
Author:tstarling
Status:old
Tags:
Comment:
Added $wgArticleRobotPolicies
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/Article.php (modified) (history)
  • /trunk/phase3/includes/DefaultSettings.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Article.php
@@ -608,7 +608,7 @@
609609 function view() {
610610 global $wgUser, $wgOut, $wgRequest, $wgContLang;
611611 global $wgEnableParserCache, $wgStylePath, $wgUseRCPatrol, $wgParser;
612 - global $wgUseTrackbacks, $wgNamespaceRobotPolicies;
 612+ global $wgUseTrackbacks, $wgNamespaceRobotPolicies, $wgArticleRobotPolicies;
613613 $sk = $wgUser->getSkin();
614614
615615 wfProfileIn( __METHOD__ );
@@ -636,6 +636,8 @@
637637 # Discourage indexing of printable versions, but encourage following
638638 if( $wgOut->isPrintable() ) {
639639 $policy = 'noindex,follow';
 640+ } elseif ( isset( $wgArticleRobotPolicies[$this->mTitle->getPrefixedText()] ) ) {
 641+ $policy = $wgArticleRobotPolicies[$this->mTitle->getPrefixedText()];
640642 } elseif( isset( $wgNamespaceRobotPolicies[$ns] ) ) {
641643 # Honour customised robot policies for this namespace
642644 $policy = $wgNamespaceRobotPolicies[$ns];
Index: trunk/phase3/includes/DefaultSettings.php
@@ -2268,6 +2268,16 @@
22692269 $wgNamespaceRobotPolicies = array();
22702270
22712271 /**
 2272+ * Robot policies per article.
 2273+ * These override the per-namespace robot policies.
 2274+ * Must be in the form of an array where the key part is a properly
 2275+ * canonicalised text form title and the value is a robot policy.
 2276+ * Example:
 2277+ * $wgArticleRobotPolicies = array( 'Main Page' => 'noindex' );
 2278+ */
 2279+$wgArticleRobotPolicies = array();
 2280+
 2281+/**
22722282 * Specifies the minimal length of a user password. If set to
22732283 * 0, empty passwords are allowed.
22742284 */
Index: trunk/phase3/RELEASE-NOTES
@@ -48,6 +48,7 @@
4949 * Added a Content-Disposition header to thumb.php output
5050 * Improved thumb.php error handling
5151 * Display file history on local image description pages of shared images
 52+* Added $wgArticleRobotPolicies
5253
5354
5455 == Bugfixes since 1.10 ==

Follow-up revisions

RevisionCommit summaryAuthorDate
r22619Merged revisions 22587-22618 via svnmerge from...david04:13, 1 June 2007