From: Oren Held Date: Sat, 13 Oct 2012 10:40:55 +0000 (+0200) Subject: (bug 37755) Set robot meta tags for 'view source' pages X-Git-Tag: 1.31.0-rc.0~21452^2 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/membres/fiche.php?a=commitdiff_plain;h=863f6f1e84cf84d53246767d44665f87a915bfb4;p=lhc%2Fweb%2Fwiklou.git (bug 37755) Set robot meta tags for 'view source' pages Apply the same robot behavior of the edit & history pages (noindex,nofollow), on view source pages (case of ?action=edit when having no edit permissios). Change-Id: Ifc162332798a3dea93db4096d26e928545fbf4b6 --- diff --git a/includes/EditPage.php b/includes/EditPage.php index cc41b02688..0e9275442c 100644 --- a/includes/EditPage.php +++ b/includes/EditPage.php @@ -477,6 +477,7 @@ class EditPage { throw new PermissionsError( $action, $permErrors ); } + $wgOut->setRobotPolicy( 'noindex,nofollow' ); $wgOut->setPageTitle( wfMessage( 'viewsource-title', $this->getContextTitle()->getPrefixedText() ) ); $wgOut->addBacklinkSubtitle( $this->getContextTitle() ); $wgOut->addWikiText( $wgOut->formatPermissionsErrorMessage( $permErrors, 'edit' ) );