Show 'Indexing by robots' status correct on action=info
authorumherirrender <umherirrender_de.wp@web.de>
Fri, 14 Feb 2014 14:21:12 +0000 (15:21 +0100)
committerIAlex <codereview@emsenhuber.ch>
Fri, 14 Feb 2014 19:43:55 +0000 (19:43 +0000)
When $wgNamespaceRobotPolicies contains a noindex for a namespace and
the page contains __INDEX__, the index status on action=info was
"Disallowed", but that is wrong, because the page is indexed.

Pass the 'index' to the robot policy logic.

Change-Id: Ib77c3e73968cdc72f657e50371a2372564a1c618

includes/actions/InfoAction.php

index 918fc9e..63f3151 100644 (file)
@@ -289,6 +289,9 @@ class InfoAction extends FormlessAction {
                if ( isset( $pageProperties['noindex'] ) ) {
                        $pOutput->setIndexPolicy( 'noindex' );
                }
+               if ( isset( $pageProperties['index'] ) ) {
+                       $pOutput->setIndexPolicy( 'index' );
+               }
 
                // Use robot policy logic
                $policy = $this->page->getRobotPolicy( 'view', $pOutput );