Index: trunk/phase3/includes/Article.php
===================================================================
--- trunk/phase3/includes/Article.php (revision 30601)
+++ trunk/phase3/includes/Article.php (revision 30602)
@@ -613,6 +613,7 @@
global $wgUser, $wgOut, $wgRequest, $wgContLang;
global $wgEnableParserCache, $wgStylePath, $wgParser;
global $wgUseTrackbacks, $wgNamespaceRobotPolicies, $wgArticleRobotPolicies;
+ global $wgDefaultRobotPolicy;
$sk = $wgUser->getSkin();
wfProfileIn( __METHOD__ );
@@ -647,8 +648,7 @@
# Honour customised robot policies for this namespace
$policy = $wgNamespaceRobotPolicies[$ns];
} else {
- # Default to encourage indexing and following links
- $policy = 'index,follow';
+ $policy = $wgDefaultRobotPolicy;
}
$wgOut->setRobotPolicy( $policy );
Index: trunk/phase3/includes/ImagePage.php
===================================================================
--- trunk/phase3/includes/ImagePage.php (revision 30601)
+++ trunk/phase3/includes/ImagePage.php (revision 30602)
@@ -69,7 +69,7 @@
} else {
# Just need to set the right headers
$wgOut->setArticleFlag( true );
- $wgOut->setRobotpolicy( 'index,follow' );
+ $wgOut->setRobotpolicy( 'noindex,nofollow' );
$wgOut->setPageTitle( $this->mTitle->getPrefixedText() );
$this->viewUpdates();
}
Index: trunk/phase3/includes/SpecialSpecialpages.php
===================================================================
--- trunk/phase3/includes/SpecialSpecialpages.php (revision 30601)
+++ trunk/phase3/includes/SpecialSpecialpages.php (revision 30602)
@@ -12,7 +12,7 @@
$wgMessageCache->loadAllMessages();
- $wgOut->setRobotpolicy( 'index,nofollow' );
+ $wgOut->setRobotpolicy( 'noindex,nofollow' ); # Is this really needed?
$sk = $wgUser->getSkin();
/** Pages available to all */
Index: trunk/phase3/includes/DefaultSettings.php
===================================================================
--- trunk/phase3/includes/DefaultSettings.php (revision 30601)
+++ trunk/phase3/includes/DefaultSettings.php (revision 30602)
@@ -2485,8 +2485,15 @@
$wgNoFollowNsExceptions = array();
/**
+ * Default robot policy.
+ * The default policy is to encourage indexing and following of links.
+ * It may be overridden on a per-namespace and/or per-page basis.
+ */
+$wgDefaultRobotPolicy = 'index,follow';
+
+/**
* Robot policies per namespaces.
- * The default policy is 'index,follow', the array is made of namespace
+ * The default policy is given above, the array is made of namespace
* constants as defined in includes/Defines.php
* Example:
* $wgNamespaceRobotPolicies = array( NS_TALK => 'noindex' );
Index: trunk/phase3/RELEASE-NOTES
===================================================================
--- trunk/phase3/RELEASE-NOTES (revision 30601)
+++ trunk/phase3/RELEASE-NOTES (revision 30602)
@@ -155,6 +155,8 @@
* (bug 10365) Localization of Special:Version
* When installing using Postgres, the Pl/Pgsql language is now checked for
and installed when at the superuser level.
+* The default robot policy for the entire wiki is now configurable via the
+ $wgDefaultRobotPolicy setting.
=== Bug fixes in 1.12 ===