Jdlrobson has uploaded a new change for review.
https://gerrit.wikimedia.org/r/56059
Change subject: Protect mobile special pages when viewed in desktop mode
......................................................................
Protect mobile special pages when viewed in desktop mode
When pages are viewed under desktop skin they throw an error. Let's protect them
from doing this.
Note the FIXME
Change-Id: Id003a680f98cee1a376b89e9e5deb098f8947616
---
M includes/specials/UnlistedSpecialMobilePage.php
1 file changed, 3 insertions(+), 1 deletion(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend
refs/changes/59/56059/1
diff --git a/includes/specials/UnlistedSpecialMobilePage.php
b/includes/specials/UnlistedSpecialMobilePage.php
index 4433524..575d7e8 100644
--- a/includes/specials/UnlistedSpecialMobilePage.php
+++ b/includes/specials/UnlistedSpecialMobilePage.php
@@ -10,6 +10,8 @@
$ctx = MobileContext::singleton();
// assumes mobile skin
$mobileSkin = $ctx->getSkin();
- $mobileSkin->addArticleClass( 'noMargins' );
+ if ( $ctx->shouldDisplayMobileView() ) {
+ $mobileSkin->addArticleClass( 'noMargins' );
+ } // FIXME: do redirect ? Make page work on desktop?
}
}
--
To view, visit https://gerrit.wikimedia.org/r/56059
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Id003a680f98cee1a376b89e9e5deb098f8947616
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