Index: trunk/phase3/includes/Article.php |
— | — | @@ -608,7 +608,7 @@ |
609 | 609 | function view() { |
610 | 610 | global $wgUser, $wgOut, $wgRequest, $wgContLang; |
611 | 611 | global $wgEnableParserCache, $wgStylePath, $wgUseRCPatrol, $wgParser; |
612 | | - global $wgUseTrackbacks, $wgNamespaceRobotPolicies; |
| 612 | + global $wgUseTrackbacks, $wgNamespaceRobotPolicies, $wgArticleRobotPolicies; |
613 | 613 | $sk = $wgUser->getSkin(); |
614 | 614 | |
615 | 615 | wfProfileIn( __METHOD__ ); |
— | — | @@ -636,6 +636,8 @@ |
637 | 637 | # Discourage indexing of printable versions, but encourage following |
638 | 638 | if( $wgOut->isPrintable() ) { |
639 | 639 | $policy = 'noindex,follow'; |
| 640 | + } elseif ( isset( $wgArticleRobotPolicies[$this->mTitle->getPrefixedText()] ) ) { |
| 641 | + $policy = $wgArticleRobotPolicies[$this->mTitle->getPrefixedText()]; |
640 | 642 | } elseif( isset( $wgNamespaceRobotPolicies[$ns] ) ) { |
641 | 643 | # Honour customised robot policies for this namespace |
642 | 644 | $policy = $wgNamespaceRobotPolicies[$ns]; |
Index: trunk/phase3/includes/DefaultSettings.php |
— | — | @@ -2268,6 +2268,16 @@ |
2269 | 2269 | $wgNamespaceRobotPolicies = array(); |
2270 | 2270 | |
2271 | 2271 | /** |
| 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 | +/** |
2272 | 2282 | * Specifies the minimal length of a user password. If set to |
2273 | 2283 | * 0, empty passwords are allowed. |
2274 | 2284 | */ |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -48,6 +48,7 @@ |
49 | 49 | * Added a Content-Disposition header to thumb.php output |
50 | 50 | * Improved thumb.php error handling |
51 | 51 | * Display file history on local image description pages of shared images |
| 52 | +* Added $wgArticleRobotPolicies |
52 | 53 | |
53 | 54 | |
54 | 55 | == Bugfixes since 1.10 == |