Jdlrobson has uploaded a new change for review.
https://gerrit.wikimedia.org/r/64090
Change subject: Skin: Remove dead code
......................................................................
Skin: Remove dead code
Change-Id: Ic571df6a1782b51492e4113c7fa2e3fa29ee8874
---
M includes/skins/SkinMobile.php
M includes/skins/SkinMobileTemplate.php
2 files changed, 7 insertions(+), 17 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend
refs/changes/90/64090/1
diff --git a/includes/skins/SkinMobile.php b/includes/skins/SkinMobile.php
index d4f2e1e..508d555 100644
--- a/includes/skins/SkinMobile.php
+++ b/includes/skins/SkinMobile.php
@@ -10,18 +10,6 @@
$tpl = parent::prepareTemplate();
$out = $this->getOutput();
$title = $this->getTitle();
- $user = $this->getUser();
- $tpl->set( 'title', $title );
- $tpl->set( 'user', $user );
- $context = MobileContext::singleton();
- $inBeta = $context->isBetaGroupMember();
- $inAlpha = $context->isAlphaGroupMember();
-
- $device = $context->getDevice();
-
- $tpl->set( 'action', $context->getRequest()->getText( 'action'
) );
- $tpl->set( 'isAlphaGroupMember', $inAlpha );
- $tpl->set( 'isBetaGroupMember', $inBeta );
// add head items
if ( $wgAppleTouchIcon !== false ) {
@@ -39,8 +27,6 @@
"document.documentElement.className += ' page-loading';"
) );
- $tpl->set( 'pagetitle', $out->getHTMLTitle() );
-
$this->prepareTemplateLinks( $tpl );
$this->prepareFooterLinks( $tpl );
@@ -51,7 +37,7 @@
wfProfileOut( __METHOD__ . '-modules' );
// setup destinations for styles/scripts at top and at bottom
- $tpl = $this->attachResources( $title, $tpl, $device );
+ $tpl = $this->attachResources( $title, $tpl );
$tpl->set( 'isSpecialPage', $title->isSpecialPage() );
@@ -161,8 +147,10 @@
return SpecialPage::getTitleFor( 'UserLogin' )->getLocalURL(
$query );
}
- protected function attachResources( Title $title, QuickTemplate $tpl,
IDeviceProperties $device ) {
+ protected function attachResources( Title $title, QuickTemplate $tpl ) {
global $wgMFVaryResources;
+ $ctx = MobileContext::singleton();
+ $device = $ctx->getDevice();
$out = $this->getOutput();
$out->setTarget( 'mobile' );
diff --git a/includes/skins/SkinMobileTemplate.php
b/includes/skins/SkinMobileTemplate.php
index 3d0f259..061ccea 100644
--- a/includes/skins/SkinMobileTemplate.php
+++ b/includes/skins/SkinMobileTemplate.php
@@ -78,6 +78,8 @@
public function getPersonalTools() {
global $wgMFNearby;
$data = $this->data;
+ $ctx = MobileContext::singleton();
+ $inBeta = $ctx->isBetaGroupMember();
$items = array(
'nearby' => array(
@@ -109,7 +111,7 @@
$nav = array();
- if ( $data['isBetaGroupMember'] && $wgMFNearby ) {
+ if ( $inBeta && $wgMFNearby ) {
$nav[] = $items['nearby'];
}
--
To view, visit https://gerrit.wikimedia.org/r/64090
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic571df6a1782b51492e4113c7fa2e3fa29ee8874
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