From: Chad Horohoe Date: Thu, 26 Feb 2009 20:10:48 +0000 (+0000) Subject: Fix regression from r30602. 'noindex,nofollow' was being applied when local page... X-Git-Tag: 1.31.0-rc.0~42669 X-Git-Url: https://git.cyclocoop.org/%28%28?a=commitdiff_plain;h=40fdd74fa9cab0ce1430078010e3859e020a0515;p=lhc%2Fweb%2Fwiklou.git Fix regression from r30602. 'noindex,nofollow' was being applied when local page text didn't exist for foreign images. Moved it to where it should be used, with 'noimage' --- diff --git a/includes/ImagePage.php b/includes/ImagePage.php index b6964d6eaa..4f3b859a2b 100644 --- a/includes/ImagePage.php +++ b/includes/ImagePage.php @@ -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 ) ); } }