From 863f6f1e84cf84d53246767d44665f87a915bfb4 Mon Sep 17 00:00:00 2001 From: Oren Held Date: Sat, 13 Oct 2012 12:40:55 +0200 Subject: [PATCH] (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 --- includes/EditPage.php | 1 + 1 file changed, 1 insertion(+) 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' ) ); -- 2.20.1