[MediaWiki-commits] [Gerrit] Clean up SkinMinerva to pass mwcodesniffer - change (mediawiki...MobileFrontend)

2014-02-14 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Clean up SkinMinerva to pass mwcodesniffer
..


Clean up SkinMinerva to pass mwcodesniffer

Change-Id: I73c91d9e1d7e0711048d48f09de3b148558dd4ec
---
M includes/skins/SkinMinerva.php
1 file changed, 48 insertions(+), 18 deletions(-)

Approvals:
  MaxSem: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/includes/skins/SkinMinerva.php b/includes/skins/SkinMinerva.php
index 9899470..e6f694c 100644
--- a/includes/skins/SkinMinerva.php
+++ b/includes/skins/SkinMinerva.php
@@ -11,7 +11,7 @@
public $skinname = 'minerva';
public $template = 'MinervaTemplate';
public $useHeadElement = true;
-   /* @var string  describing the current stability of the skin, can be 
overriden by derivative experimental skins */
+   /* @var string  describes 'stability' of the skin - alpha, beta, stable 
*/
protected $mode = 'stable';
 
protected function prepareQuickTemplate() {
@@ -25,14 +25,24 @@
);
}
$out->addHeadItem( 'viewport',
-   Html::element( 'meta', array( 'name' => 'viewport', 
'content' => 'initial-scale=1.0, user-scalable=yes, minimum-scale=0.25, 
maximum-scale=1.6' ) )
+   Html::element(
+   'meta', array(
+   'name' => 'viewport',
+   'content' => 'initial-scale=1.0, 
user-scalable=yes, minimum-scale=0.25, maximum-scale=1.6',
+   )
+   )
);
// hide chrome on bookmarked sites
$out->addHeadItem( 'apple-mobile-web-app-capable',
Html::element( 'meta', array( 'name' => 
'apple-mobile-web-app-capable', 'content' => 'yes' ) )
);
$out->addHeadItem( 'apple-mobile-web-app-status-bar-style',
-   Html::element( 'meta', array( 'name' => 
'apple-mobile-web-app-status-bar-style', 'content' => 'black' ) )
+   Html::element(
+   'meta', array(
+   'name' => 
'apple-mobile-web-app-status-bar-style',
+   'content' => 'black',
+   )
+   )
);
$out->addHeadItem( 'loadingscript', Html::inlineScript(
"document.documentElement.className += ' page-loading';"
@@ -42,7 +52,8 @@
}
 
if ( $this->isMobileMode ) {
-   // FIXME: This needs to occur before 
prepareQuickTemplate which wraps the body text in an element with id 
mw-content-text
+   // @FIXME: This needs to occur before 
prepareQuickTemplate which wraps the body text in an
+   // element with id mw-content-text
// Otherwise we end up with an unnecessary div.
$html = ExtMobileFrontend::DOMParse( $out );
}
@@ -64,7 +75,8 @@
$this->prepareLanguages( $tpl );
// FIXME: Remove need for a page-loading class
$bottomScripts = Html::inlineScript(
-   "document.documentElement.className = 
document.documentElement.className.replace( 'page-loading', '' );"
+   "document.documentElement.className = " .
+   "document.documentElement.className.replace( 
'page-loading', '' );"
);
$bottomScripts .= $out->getBottomScripts();
$tpl->set( 'bottomscripts', $bottomScripts );
@@ -116,7 +128,7 @@
$className = $this->getMode();
if ( $title->isMainPage() ) {
$className .= ' page-Main_Page ';
-   } else if ( $title->isSpecialPage() ) {
+   } elseif ( $title->isSpecialPage() ) {
$className .= ' mw-mf-special ';
}
if ( !$this->getUser()->isAnon() ) {
@@ -171,11 +183,15 @@
$tpl->set( 'secondaryButton',
Html::openElement( 'a', array(
'title' => wfMessage( 
'mobile-frontend-user-button-tooltip' ),
-   'href' => 
$notificationsTitle->getLocalURL( array( 'returnto' => 
$currentTitle->getPrefixedText() ) ),
+   'href' => 
$notificationsTitle->getLocalURL(
+   array( 'returnto' => 
$currentTitle->getPrefixedText() ) ),
'class' => 'user-button',
'id'=> 'secondary-button',
) ) .

[MediaWiki-commits] [Gerrit] Clean up SkinMinerva to pass mwcodesniffer - change (mediawiki...MobileFrontend)

2014-02-12 Thread Awjrichards (Code Review)
Awjrichards has uploaded a new change for review.

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

Change subject: Clean up SkinMinerva to pass mwcodesniffer
..

Clean up SkinMinerva to pass mwcodesniffer

Change-Id: I73c91d9e1d7e0711048d48f09de3b148558dd4ec
---
M includes/skins/SkinMinerva.php
1 file changed, 48 insertions(+), 18 deletions(-)


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

diff --git a/includes/skins/SkinMinerva.php b/includes/skins/SkinMinerva.php
index 9899470..d374a25 100644
--- a/includes/skins/SkinMinerva.php
+++ b/includes/skins/SkinMinerva.php
@@ -11,7 +11,7 @@
public $skinname = 'minerva';
public $template = 'MinervaTemplate';
public $useHeadElement = true;
-   /* @var string  describing the current stability of the skin, can be 
overriden by derivative experimental skins */
+   /* @var string  describes 'stability' of the skin - alpha, beta, stable 
*/
protected $mode = 'stable';
 
protected function prepareQuickTemplate() {
@@ -25,14 +25,24 @@
);
}
$out->addHeadItem( 'viewport',
-   Html::element( 'meta', array( 'name' => 'viewport', 
'content' => 'initial-scale=1.0, user-scalable=yes, minimum-scale=0.25, 
maximum-scale=1.6' ) )
+   Html::element(
+   'meta', array(
+   'name' => 'viewport',
+   'content' => 'initial-scale=1.0, 
user-scalable=yes, minimum-scale=0.25, maximum-scale=1.6',
+   )
+   )
);
// hide chrome on bookmarked sites
$out->addHeadItem( 'apple-mobile-web-app-capable',
Html::element( 'meta', array( 'name' => 
'apple-mobile-web-app-capable', 'content' => 'yes' ) )
);
$out->addHeadItem( 'apple-mobile-web-app-status-bar-style',
-   Html::element( 'meta', array( 'name' => 
'apple-mobile-web-app-status-bar-style', 'content' => 'black' ) )
+   Html::element(
+   'meta', array(
+   'name' => 
'apple-mobile-web-app-status-bar-style',
+   'content' => 'black',
+   )
+   )
);
$out->addHeadItem( 'loadingscript', Html::inlineScript(
"document.documentElement.className += ' page-loading';"
@@ -42,7 +52,8 @@
}
 
if ( $this->isMobileMode ) {
-   // FIXME: This needs to occur before 
prepareQuickTemplate which wraps the body text in an element with id 
mw-content-text
+   // @FIXME: This needs to occur before 
prepareQuickTemplate which wraps the body text in an
+   // element with id mw-content-text
// Otherwise we end up with an unnecessary div.
$html = ExtMobileFrontend::DOMParse( $out );
}
@@ -64,7 +75,8 @@
$this->prepareLanguages( $tpl );
// FIXME: Remove need for a page-loading class
$bottomScripts = Html::inlineScript(
-   "document.documentElement.className = 
document.documentElement.className.replace( 'page-loading', '' );"
+   "document.documentElement.className = " . 
+   "document.documentElement.className.replace( 
'page-loading', '' );"
);
$bottomScripts .= $out->getBottomScripts();
$tpl->set( 'bottomscripts', $bottomScripts );
@@ -116,7 +128,7 @@
$className = $this->getMode();
if ( $title->isMainPage() ) {
$className .= ' page-Main_Page ';
-   } else if ( $title->isSpecialPage() ) {
+   } elseif ( $title->isSpecialPage() ) {
$className .= ' mw-mf-special ';
}
if ( !$this->getUser()->isAnon() ) {
@@ -171,11 +183,15 @@
$tpl->set( 'secondaryButton',
Html::openElement( 'a', array(
'title' => wfMessage( 
'mobile-frontend-user-button-tooltip' ),
-   'href' => 
$notificationsTitle->getLocalURL( array( 'returnto' => 
$currentTitle->getPrefixedText() ) ),
+   'href' => 
$notificationsTitle->getLocalURL(
+   array( 'returnto' => 
$currentTitle->getPrefixedText() ) ),
'class' => 'user-button',