Jdlrobson has uploaded a new change for review.
https://gerrit.wikimedia.org/r/289336
Change subject: Don't load initialision edit or watch code on special pages
......................................................................
Don't load initialision edit or watch code on special pages
Bug: T135542
Change-Id: I822df500ac2793b3ad9cc83d38e9cda97813b82f
---
M includes/skins/SkinMinerva.php
1 file changed, 11 insertions(+), 8 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend
refs/changes/36/289336/1
diff --git a/includes/skins/SkinMinerva.php b/includes/skins/SkinMinerva.php
index 96d5ba1..8172234 100644
--- a/includes/skins/SkinMinerva.php
+++ b/includes/skins/SkinMinerva.php
@@ -1002,6 +1002,17 @@
$campaign = $req->getVal( 'campaign' );
$title = $this->getTitle();
+
+ if ( !$title->isSpecialPage() ) {
+ if ( $this->isAllowedPageAction( 'watch' ) ) {
+ // Explicitly add the mobile watchstar code.
+ $modules[] = 'skins.minerva.watchstar';
+ }
+ if ( $this->isAllowedPageAction( 'edit' ) ) {
+ $modules[] = 'skins.minerva.editor';
+ }
+ }
+
if ( $user->isLoggedIn() ) {
if ( $this->useEcho() ) {
$modules[] = 'skins.minerva.notifications';
@@ -1043,14 +1054,6 @@
// Doing this unconditionally, prevents the desktop watchstar
from ever leaking into mobile view.
$modules['watch'] = [];
- if ( $this->isAllowedPageAction( 'watch' ) ) {
- // Explicitly add the mobile watchstar code.
- $modules['watch'] = [ 'skins.minerva.watchstar' ];
- }
-
- if ( $this->isAllowedPageAction( 'edit' ) ) {
- $modules['editor'] = [ 'skins.minerva.editor' ];
- }
$modules['context'] = $this->getContextSpecificModules();
--
To view, visit https://gerrit.wikimedia.org/r/289336
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I822df500ac2793b3ad9cc83d38e9cda97813b82f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Jdlrobson <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits