Merge "Disable mobile editor (skins.minerva.editor) on desktop"

This commit is contained in:
jenkins-bot 2018-11-05 22:11:12 +00:00 committed by Gerrit Code Review
commit 69eddce6be
1 changed files with 4 additions and 1 deletions

View File

@ -1331,12 +1331,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';
}
}