Fix regression from r30602. 'noindex,nofollow' was being applied when local page...
authorChad Horohoe <demon@users.mediawiki.org>
Thu, 26 Feb 2009 20:10:48 +0000 (20:10 +0000)
committerChad Horohoe <demon@users.mediawiki.org>
Thu, 26 Feb 2009 20:10:48 +0000 (20:10 +0000)
includes/ImagePage.php

index b6964d6..4f3b859 100644 (file)
@@ -105,7 +105,6 @@ class ImagePage extends Article {
                } else {
                        # Just need to set the right headers
                        $wgOut->setArticleFlag( true );
-                       $wgOut->setRobotPolicy( 'noindex,nofollow' );
                        $wgOut->setPageTitle( $this->mTitle->getPrefixedText() );
                        $this->viewUpdates();
                }
@@ -469,6 +468,7 @@ EOT
                        $title = SpecialPage::getTitleFor( 'Upload' );
                        $link = $sk->makeKnownLinkObj($title, wfMsgHtml('noimage-linktext'),
                                'wpDestFile=' . urlencode( $this->displayImg->getName() ) );
+                       $wgOut->setRobotPolicy( 'noindex,nofollow' );
                        $wgOut->addHTML( wfMsgWikiHtml( 'noimage', $link ) );
                }
        }