jenkins-bot has submitted this change and it was merged.
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, 19 insertions(+), 25 deletions(-)
Approvals:
awjrichards: Verified; Looks good to me, approved
jenkins-bot: Verified
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 d077a36..f4a8eb7 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 765478d..bcb4cf9 100644
--- a/includes/specials/SpecialUploads.php
+++ b/includes/specials/SpecialUploads.php
@@ -8,13 +8,11 @@
public function execute( $par = '' ) {
global $wgMFPhotoUploadEndpoint;
- $ctx = MobileContext::singleton();
$user = $this->getUser();
$this->setHeaders();
$output = $this->getOutput();
- $endpoint = $wgMFPhotoUploadEndpoint ? $wgMFPhotoUploadEndpoint
: '';
- $output->addJsConfigVars( 'wgMFPhotoUploadEndpoint', $endpoint
);
+ $output->addJsConfigVars( 'wgMFPhotoUploadEndpoint',
$wgMFPhotoUploadEndpoint );
$output->htmlClass = 'galleryPage';
$output->setPageTitle( $this->msg(
'mobile-frontend-donate-image-title' ) );
@@ -62,7 +60,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: merged
Gerrit-Change-Id: I5b3a370515117c1c6766eedcfd933bf0b6e4f760
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: MaxSem <[email protected]>
Gerrit-Reviewer: awjrichards <[email protected]>
Gerrit-Reviewer: jenkins-bot
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits