MaxSem has uploaded a new change for review.

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


Change subject: Lots of minor fixes
......................................................................

Lots of minor fixes

* Unused vars
* echo void
* Class calling its descendant's function

Change-Id: I5b3a370515117c1c6766eedcfd933bf0b6e4f760
---
M includes/MobileContext.php
M includes/skins/MinervaTemplate.php
M includes/skins/MobileTemplate.php
M includes/skins/SkinMinerva.php
M includes/skins/SkinMobile.php
M includes/skins/SkinMobileBase.php
M includes/specials/SpecialMobileDiff.php
M includes/specials/SpecialUploads.php
M includes/specials/UnlistedSpecialMobilePage.php
9 files changed, 18 insertions(+), 23 deletions(-)


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

diff --git a/includes/MobileContext.php b/includes/MobileContext.php
index 49e67f0..1b67389 100644
--- a/includes/MobileContext.php
+++ b/includes/MobileContext.php
@@ -257,7 +257,6 @@
                global $wgMobileUrlTemplate;
                // always display non-mobile view for edit/history/diff
                $action = $this->getAction();
-               $req = $this->getRequest();
                $stableMode = !$this->isBetaGroupMember();
 
                // FIXME: remove when editor moves to stable
diff --git a/includes/skins/MinervaTemplate.php 
b/includes/skins/MinervaTemplate.php
index 2be42ed..1b9edd0 100644
--- a/includes/skins/MinervaTemplate.php
+++ b/includes/skins/MinervaTemplate.php
@@ -133,7 +133,7 @@
                                ?>
                                <div class="header">
                                        <?php
-                                               echo $this->html( 'menuButton' 
);
+                                               $this->html( 'menuButton' );
                                                if ( $isSpecialPage ) {
                                                        echo 
$data['specialPageHeader'];
                                                } else {
@@ -157,13 +157,13 @@
                                                                
$this->renderPageActions( $data );
                                                        }
                                                        echo $data[ 'bodytext' 
];
-                                                       echo 
$this->renderLanguages( $languageData );
+                                                       $this->renderLanguages( 
$languageData );
                                                        echo 
$data['postbodytext'];
                                                ?>
                                        </div><!-- close #content -->
                                </div><!-- close #content_wrapper -->
                                <?php
-                                       echo $this->renderFooter( $data );
+                                       $this->renderFooter( $data );
                                ?>
                        </div><!-- close #mw-mf-page-center -->
                </div><!-- close #mw-mf-viewport -->
diff --git a/includes/skins/MobileTemplate.php 
b/includes/skins/MobileTemplate.php
index 9133b1b..1d7519b 100644
--- a/includes/skins/MobileTemplate.php
+++ b/includes/skins/MobileTemplate.php
@@ -76,7 +76,7 @@
        /**
         * Returns an array of footerlinks trimmed down to only those footer 
links that
         * are valid.
-        * @param $option currently unused in mobile
+        * @param null $option: Currently unused in mobile
         * @return array|mixed
         */
        public function getFooterLinks( $option = null ) {
diff --git a/includes/skins/SkinMinerva.php b/includes/skins/SkinMinerva.php
index 8252d39..c919a13 100644
--- a/includes/skins/SkinMinerva.php
+++ b/includes/skins/SkinMinerva.php
@@ -163,4 +163,17 @@
                );
                $out->addModuleStyles( $styles );
        }
+
+       /**
+        * Determines what the heading of the login page should be based on the 
context
+        * @return string
+        */
+       protected function getLoginPageHeading() {
+               if ( $this->getRequest()->getVal( 'type' ) == 'signup' ) {
+                       $key = 'mobile-frontend-sign-up-heading';
+               } else {
+                       $key = 'mobile-frontend-sign-in-heading';
+               }
+               return wfMessage( $key )->plain();
+       }
 }
diff --git a/includes/skins/SkinMobile.php b/includes/skins/SkinMobile.php
index 1c7d84b..0d9a2a3 100644
--- a/includes/skins/SkinMobile.php
+++ b/includes/skins/SkinMobile.php
@@ -262,19 +262,6 @@
        }
 
        /**
-        * Determines what the heading of the login page should be based on the 
context
-        * @return string
-        */
-       protected function getLoginPageHeading() {
-               if ( $this->getRequest()->getVal( 'type' ) == 'signup' ) {
-                       $key = 'mobile-frontend-sign-up-heading';
-               } else {
-                       $key = 'mobile-frontend-sign-in-heading';
-               }
-               return wfMessage( $key )->plain();
-       }
-
-       /**
         * Creates a login or logout button
         * @return Array: Representation of button with text and href keys
        */
diff --git a/includes/skins/SkinMobileBase.php 
b/includes/skins/SkinMobileBase.php
index d093288..f137fdc 100644
--- a/includes/skins/SkinMobileBase.php
+++ b/includes/skins/SkinMobileBase.php
@@ -57,7 +57,6 @@
                $menu = array();
                $actions = $tpl->data['content_navigation']['actions'];
                $namespaces = $tpl->data['content_navigation']['namespaces'];
-               $views = $tpl->data['content_navigation']['views'];
 
                // empty placeholder for edit photos which both require js
                $menu['edit'] = array( 'id' => 'ca-edit', 'text' => '' );
diff --git a/includes/specials/SpecialMobileDiff.php 
b/includes/specials/SpecialMobileDiff.php
index 45e25aa..e3a4a4f 100644
--- a/includes/specials/SpecialMobileDiff.php
+++ b/includes/specials/SpecialMobileDiff.php
@@ -184,7 +184,6 @@
                        $this->msg( 'mobile-frontend-diffview-explained' 
)->plain() );
                /** @var $el DOMElement */
                foreach( $els as $el ) {
-                       $name = $el->nodeName;
                        $class = $el->getAttribute( 'class' );
                        if ( $class === 'diff-deletedline' ) {
                                $out .= Html::element( 'del', array(), 
$el->nodeValue );
diff --git a/includes/specials/SpecialUploads.php 
b/includes/specials/SpecialUploads.php
index d419019..01297b2 100644
--- a/includes/specials/SpecialUploads.php
+++ b/includes/specials/SpecialUploads.php
@@ -7,7 +7,6 @@
        }
 
        public function execute( $par = '' ) {
-               $ctx = MobileContext::singleton();
                $user = $this->getUser();
 
                $this->setHeaders();
@@ -59,7 +58,7 @@
         *              or will return false if there are database errors.
         */
        private function getUserUploadCount( $username ) {
-               global $wgMFPhotoUploadEndpoint, $wgMFPhotoUploadWiki, $wgConf;
+               global $wgMFPhotoUploadWiki, $wgConf;
 
                if ( !$wgMFPhotoUploadWiki ) {
                        $dbr = wfGetDB( DB_SLAVE );
diff --git a/includes/specials/UnlistedSpecialMobilePage.php 
b/includes/specials/UnlistedSpecialMobilePage.php
index d7bee77..23af2a9 100644
--- a/includes/specials/UnlistedSpecialMobilePage.php
+++ b/includes/specials/UnlistedSpecialMobilePage.php
@@ -8,7 +8,6 @@
        }
 
        protected function addModules() {
-               global $wgResourceModules;
                $out = $this->getOutput();
                $rl = $out->getResourceLoader();
                $title = $this->getTitle();

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5b3a370515117c1c6766eedcfd933bf0b6e4f760
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