MaxSem has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/63806


Change subject: Fix special pages spewing modules to Special:Specialpages
......................................................................

Fix special pages spewing modules to Special:Specialpages

Change-Id: I0d6865fc619d1017a5e5152e2576f501483672cb
---
M includes/specials/SpecialMobileDiff.php
M includes/specials/SpecialMobileWatchlist.php
M includes/specials/SpecialUploads.php
M includes/specials/UnlistedSpecialMobilePage.php
4 files changed, 7 insertions(+), 8 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend 
refs/changes/06/63806/1

diff --git a/includes/specials/SpecialMobileDiff.php 
b/includes/specials/SpecialMobileDiff.php
index 74d34be..0df9116 100644
--- a/includes/specials/SpecialMobileDiff.php
+++ b/includes/specials/SpecialMobileDiff.php
@@ -14,6 +14,7 @@
        }
 
        function execute( $par ) {
+               $this->setHeaders();
                $output = $this->getOutput();
 
                $this->revId = intval( $par );
diff --git a/includes/specials/SpecialMobileWatchlist.php 
b/includes/specials/SpecialMobileWatchlist.php
index 238e098..ab35030 100644
--- a/includes/specials/SpecialMobileWatchlist.php
+++ b/includes/specials/SpecialMobileWatchlist.php
@@ -30,6 +30,7 @@
                $view = $req->getVal( 'watchlistview', 'a-z' );
                $this->fromPageTitle = Title::newFromText( $req->getVal( 
'from', false ) );
 
+               $this->setHeaders();
                $output->setPageTitle( $this->msg( 'watchlist' ) );
 
                if( $user->isAnon() ) {
diff --git a/includes/specials/SpecialUploads.php 
b/includes/specials/SpecialUploads.php
index bf57064..52beede 100644
--- a/includes/specials/SpecialUploads.php
+++ b/includes/specials/SpecialUploads.php
@@ -10,8 +10,6 @@
                $ctx = MobileContext::singleton();
                $user = $this->getUser();
 
-               $mobileSkin = $ctx->getSkin();
-
                $this->setHeaders();
                $output = $this->getOutput();
                $output->htmlClass = 'galleryPage';
diff --git a/includes/specials/UnlistedSpecialMobilePage.php 
b/includes/specials/UnlistedSpecialMobilePage.php
index ddb06f7..8f7cd1e 100644
--- a/includes/specials/UnlistedSpecialMobilePage.php
+++ b/includes/specials/UnlistedSpecialMobilePage.php
@@ -1,13 +1,13 @@
 <?php
 class UnlistedSpecialMobilePage extends UnlistedSpecialPage {
 
-       public function __construct( $name, $restriction = '', $function = 
false, $file = 'default' ) {
-               parent::__construct( $name, $restriction, false, $function, 
$file );
+       public function setHeaders() {
+               parent::setHeaders();
                $this->clearPageMargins();
-               $this->addModules( $name );
+               $this->addModules();
        }
 
-       public function addModules( $name ) {
+       protected function addModules() {
                global $wgResourceModules;
                $out = $this->getOutput();
                $title = $this->getTitle();
@@ -25,8 +25,7 @@
                }
        }
 
-       public function clearPageMargins() {
-               $ctx = MobileContext::singleton();
+       protected function clearPageMargins() {
                $this->getOutput()->setProperty( 'bodyClassName', 'no-margins' 
);
        }
 }

-- 
To view, visit https://gerrit.wikimedia.org/r/63806
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0d6865fc619d1017a5e5152e2576f501483672cb
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: MaxSem <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to