From 40fdd74fa9cab0ce1430078010e3859e020a0515 Mon Sep 17 00:00:00 2001 From: Chad Horohoe Date: Thu, 26 Feb 2009 20:10:48 +0000 Subject: [PATCH] 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' --- includes/ImagePage.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 ) ); } } -- 2.20.1