From: Antoine Musso Date: Thu, 4 Jan 2007 18:48:19 +0000 (+0000) Subject: Fix #8413 : document $wgNamespaceRobotPolicies better in LocalSettings.php X-Git-Tag: 1.31.0-rc.0~54667 X-Git-Url: http://git.cyclocoop.org/%24action?a=commitdiff_plain;h=eb7ec90a8715adc44e71f0cba9d94975ccbc5886;p=lhc%2Fweb%2Fwiklou.git Fix #8413 : document $wgNamespaceRobotPolicies better in LocalSettings.php --- diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 29cbecbb25..10420e7e72 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -459,6 +459,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN * Introduce new flag 'R' - raw output for language variant escape tags * Advise users when updates for a query page have been disabled using $wgDisableQueryPageUpdate +* (bug 8413) better comments for $wgNamespaceRobotPolicies setting. == Languages updated == diff --git a/includes/Article.php b/includes/Article.php index dd9178ecae..6b4f527082 100644 --- a/includes/Article.php +++ b/includes/Article.php @@ -632,6 +632,8 @@ class Article { if ( isset( $wgNamespaceRobotPolicies[$ns] ) ) { $policy = $wgNamespaceRobotPolicies[$ns]; } else { + # The default policy. Dev note: make sure you change the documentation + # in DefaultSettings.php before changing it. $policy = 'index,follow'; } $wgOut->setRobotpolicy( $policy ); diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php index 468307b6df..7f8b40e8ef 100644 --- a/includes/DefaultSettings.php +++ b/includes/DefaultSettings.php @@ -2057,8 +2057,11 @@ $wgNoFollowLinks = true; $wgNoFollowNsExceptions = array(); /** - * Robot policies for namespaces - * e.g. $wgNamespaceRobotPolicies = array( NS_TALK => 'noindex' ); + * Robot policies per namespaces. + * The default policy is 'index,follow', the array is made of namespace + * constants as defined in includes/Defines.php + * Example: + * $wgNamespaceRobotPolicies = array( NS_TALK => 'noindex' ); */ $wgNamespaceRobotPolicies = array();