Index: trunk/phase3/includes/OutputPage.php |
— | — | @@ -472,11 +472,15 @@ |
473 | 473 | * @param ParserOutput object &$parserOutput |
474 | 474 | */ |
475 | 475 | public function addParserOutputNoText( &$parserOutput ) { |
| 476 | + global $wgAllowUserRobotsControl; |
| 477 | + |
476 | 478 | $this->mLanguageLinks += $parserOutput->getLanguageLinks(); |
477 | 479 | $this->addCategoryLinks( $parserOutput->getCategories() ); |
478 | 480 | $this->mNewSectionLink = $parserOutput->getNewSection(); |
479 | | - # FIXME: This probably overrides $wgArticleRobotPolicies, is that wise? |
480 | | - $this->setIndexPolicy( $parserOutput->getIndexPolicy() ); |
| 481 | + if( $wgAllowUserRobotsControl ) { |
| 482 | + # FIXME: This probably overrides $wgArticleRobotPolicies, is that wise? |
| 483 | + $this->setIndexPolicy( $parserOutput->getIndexPolicy() ); |
| 484 | + } |
481 | 485 | $this->addKeywords( $parserOutput ); |
482 | 486 | $this->mParseWarnings = $parserOutput->getWarnings(); |
483 | 487 | if ( $parserOutput->getCacheTime() == -1 ) { |
Index: trunk/phase3/includes/DefaultSettings.php |
— | — | @@ -2824,6 +2824,13 @@ |
2825 | 2825 | $wgArticleRobotPolicies = array(); |
2826 | 2826 | |
2827 | 2827 | /** |
| 2828 | + * Set to true to allow the __INDEX__ and __NOINDEX__ magic words to function. |
| 2829 | + * These will allow users to control whether any page they can edit is indexed |
| 2830 | + * by search engines. |
| 2831 | + */ |
| 2832 | +$wgAllowUserRobotsControl = false; |
| 2833 | + |
| 2834 | +/** |
2828 | 2835 | * Specifies the minimal length of a user password. If set to |
2829 | 2836 | * 0, empty passwords are allowed. |
2830 | 2837 | */ |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -20,12 +20,13 @@ |
21 | 21 | |
22 | 22 | === Configuration changes in 1.14 === |
23 | 23 | |
24 | | -None yet |
| 24 | +* (bug 8068) $wgAllowUserRobotsControl (false by default) can enable new |
| 25 | + __INDEX__ and __NOINDEX__ magic words, which allow user control of search en- |
| 26 | + gine indexing on a per-article basis. |
25 | 27 | |
26 | 28 | === New features in 1.14 === |
27 | 29 | |
28 | | -* (bug 8068) New __INDEX__ and __NOINDEX__ magic words allow control of search |
29 | | -engine indexing on a per-article basis. |
| 30 | +None yet |
30 | 31 | |
31 | 32 | === Bug fixes in 1.14 === |
32 | 33 | |