From f4c32ab7b80d21d704a2bb5e4d866ac4fe9f7aee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartosz=20Dziewo=C5=84ski?= Date: Thu, 1 Dec 2022 22:26:45 +0100 Subject: [PATCH] Don't index VE edit pages Bug: T319124 Change-Id: Ia738698e93252f884b9045aab5840465d3f0d3d3 (cherry picked from commit b368d741a1ed5eac6de9c2412506b989276bfa00) --- includes/Hooks.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/includes/Hooks.php b/includes/Hooks.php index de691c858c..306af88641 100644 --- a/includes/Hooks.php +++ b/includes/Hooks.php @@ -116,6 +116,11 @@ class Hooks { 'wgEditSubmitButtonLabelPublish', $veConfig->get( 'EditSubmitButtonLabelPublish' ) ); + + // Don't index VE edit pages (T319124) + if ( $output->getRequest()->getVal( 'veaction' ) ) { + $output->setRobotPolicy( 'noindex,nofollow' ); + } } /**