From d57f8290c3d8f61e7412e04e330cc8e4ebbff67f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartosz=20Dziewo=C5=84ski?= Date: Fri, 26 Oct 2018 21:21:13 +0200 Subject: [PATCH] Disable mobile editor (skins.minerva.editor) on desktop This module is no longer necessary to allow editing pages in the Minerva skin. When it is not loaded, the normal desktop editor will be used instead (that may be WikiEditor, VisualEditor, just the plain textarea from MediaWiki core, or something else). Bug: T198765 Bug: T208068 Change-Id: I1eb9d4b4bc937522e527dbdc0d6be82baf3b7413 --- includes/skins/SkinMinerva.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/includes/skins/SkinMinerva.php b/includes/skins/SkinMinerva.php index dc456a5b3..b320f6bc5 100644 --- a/includes/skins/SkinMinerva.php +++ b/includes/skins/SkinMinerva.php @@ -1332,12 +1332,15 @@ class SkinMinerva extends SkinTemplate { $req = $this->getRequest(); $title = $this->getTitle(); + $isMFMobile = class_exists( 'MobileContext' ) && + MobileContext::singleton()->shouldDisplayMobileView(); + if ( !$title->isSpecialPage() ) { if ( $this->isAllowedPageAction( 'watch' ) ) { // Explicitly add the mobile watchstar code. $modules[] = 'skins.minerva.watchstar'; } - if ( $this->isCurrentPageContentModelEditable() ) { + if ( $isMFMobile && $this->isCurrentPageContentModelEditable() ) { $modules[] = 'skins.minerva.editor'; } }