Index: trunk/phase3/includes/Article.php |
— | — | @@ -613,6 +613,7 @@ |
614 | 614 | global $wgUser, $wgOut, $wgRequest, $wgContLang; |
615 | 615 | global $wgEnableParserCache, $wgStylePath, $wgParser; |
616 | 616 | global $wgUseTrackbacks, $wgNamespaceRobotPolicies, $wgArticleRobotPolicies; |
| 617 | + global $wgDefaultRobotPolicy; |
617 | 618 | $sk = $wgUser->getSkin(); |
618 | 619 | |
619 | 620 | wfProfileIn( __METHOD__ ); |
— | — | @@ -647,8 +648,7 @@ |
648 | 649 | # Honour customised robot policies for this namespace |
649 | 650 | $policy = $wgNamespaceRobotPolicies[$ns]; |
650 | 651 | } else { |
651 | | - # Default to encourage indexing and following links |
652 | | - $policy = 'index,follow'; |
| 652 | + $policy = $wgDefaultRobotPolicy; |
653 | 653 | } |
654 | 654 | $wgOut->setRobotPolicy( $policy ); |
655 | 655 | |
Index: trunk/phase3/includes/ImagePage.php |
— | — | @@ -69,7 +69,7 @@ |
70 | 70 | } else { |
71 | 71 | # Just need to set the right headers |
72 | 72 | $wgOut->setArticleFlag( true ); |
73 | | - $wgOut->setRobotpolicy( 'index,follow' ); |
| 73 | + $wgOut->setRobotpolicy( 'noindex,nofollow' ); |
74 | 74 | $wgOut->setPageTitle( $this->mTitle->getPrefixedText() ); |
75 | 75 | $this->viewUpdates(); |
76 | 76 | } |
Index: trunk/phase3/includes/SpecialSpecialpages.php |
— | — | @@ -12,7 +12,7 @@ |
13 | 13 | |
14 | 14 | $wgMessageCache->loadAllMessages(); |
15 | 15 | |
16 | | - $wgOut->setRobotpolicy( 'index,nofollow' ); |
| 16 | + $wgOut->setRobotpolicy( 'noindex,nofollow' ); # Is this really needed? |
17 | 17 | $sk = $wgUser->getSkin(); |
18 | 18 | |
19 | 19 | /** Pages available to all */ |
Index: trunk/phase3/includes/DefaultSettings.php |
— | — | @@ -2485,8 +2485,15 @@ |
2486 | 2486 | $wgNoFollowNsExceptions = array(); |
2487 | 2487 | |
2488 | 2488 | /** |
| 2489 | + * Default robot policy. |
| 2490 | + * The default policy is to encourage indexing and following of links. |
| 2491 | + * It may be overridden on a per-namespace and/or per-page basis. |
| 2492 | + */ |
| 2493 | +$wgDefaultRobotPolicy = 'index,follow'; |
| 2494 | + |
| 2495 | +/** |
2489 | 2496 | * Robot policies per namespaces. |
2490 | | - * The default policy is 'index,follow', the array is made of namespace |
| 2497 | + * The default policy is given above, the array is made of namespace |
2491 | 2498 | * constants as defined in includes/Defines.php |
2492 | 2499 | * Example: |
2493 | 2500 | * $wgNamespaceRobotPolicies = array( NS_TALK => 'noindex' ); |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -155,6 +155,8 @@ |
156 | 156 | * (bug 10365) Localization of Special:Version |
157 | 157 | * When installing using Postgres, the Pl/Pgsql language is now checked for |
158 | 158 | and installed when at the superuser level. |
| 159 | +* The default robot policy for the entire wiki is now configurable via the |
| 160 | + $wgDefaultRobotPolicy setting. |
159 | 161 | |
160 | 162 | === Bug fixes in 1.12 === |
161 | 163 | |