jenkins-bot has submitted this change and it was merged.
Change subject: Removed some unused globals + now pointless MEDIAWIKI checks
......................................................................
Removed some unused globals + now pointless MEDIAWIKI checks
Also killed the MonoBookToolboxEnd hook for good (IIRC nothing's used it
in ages, and everything should use SkinTemplateToolboxEnd anyway) and
swapped the remaining hook call from wfRunHooks to Hooks::run();
Hooks::run() has been available for a long time and in 1.24 or 1.25 it
finally deprecated wfRunHooks and thus is the recommended way to fire a
hook.
Change-Id: Ie83c6520575eaa706d728ac3078433a956b61c5c
---
M GreyStuff.skin.php
M GreyStuffTemplate.php
2 files changed, 6 insertions(+), 21 deletions(-)
Approvals:
Isarra: Looks good to me, approved
jenkins-bot: Verified
diff --git a/GreyStuff.skin.php b/GreyStuff.skin.php
index 6e79c9e..76695aa 100644
--- a/GreyStuff.skin.php
+++ b/GreyStuff.skin.php
@@ -11,10 +11,6 @@
* @date 2014
*/
-if ( !defined( 'MEDIAWIKI' ) ) {
- die( -1 );
-}
-
/**
* Inherit main code from SkinTemplate, set the CSS and template filter.
* @ingroup Skins
@@ -27,11 +23,9 @@
* @param $out OutputPage
*/
function setupSkinUserCss( OutputPage $out ) {
- global $wgVersion;
-
parent::setupSkinUserCss( $out );
- // Add css
+ // Add CSS
$out->addModuleStyles( array (
'mediawiki.skinning.content.externallinks',
'skins.greystuff'
diff --git a/GreyStuffTemplate.php b/GreyStuffTemplate.php
index 12896d6..32b6145 100644
--- a/GreyStuffTemplate.php
+++ b/GreyStuffTemplate.php
@@ -13,10 +13,6 @@
* The DOM here is an utter trainwreck.
*/
-if ( !defined( 'MEDIAWIKI' ) ) {
- die( -1 );
-}
-
/**
* Main skin class
* @ingroup Skins
@@ -28,11 +24,9 @@
* Takes an associative array of data set from a SkinTemplate-based
* class, and a wrapper for MediaWiki's localization database, and
* outputs a formatted page.
- *
- * @access private
*/
function execute() {
- global $wgHostLink, $wgDefaultSkin;
+ $this->data['pageLanguage'] =
$this->getSkin()->getTitle()->getPageViewLanguage()->getHtmlCode();
$this->html( 'headelement' );
?>
@@ -112,7 +106,6 @@
?>
<div id="content-header">
<h1 id="firstHeading"
class="firstHeading" lang="<?php
- $this->data['pageLanguage'] =
$this->getSkin()->getTitle()->getPageViewLanguage()->getHtmlCode();
$this->text( 'pageLanguage' );
?>">
@@ -301,8 +294,7 @@
<li id="t-purge"><?php echo $link; ?></li>
<?php
- wfRunHooks( 'MonoBookTemplateToolboxEnd',
array( &$this ) );
- wfRunHooks( 'SkinTemplateToolboxEnd', array(
&$this, true ) );
+ Hooks::run( 'SkinTemplateToolboxEnd', array(
&$this, true ) );
?>
</ul>
</div>
@@ -352,8 +344,8 @@
}
private function outputFooter() {
- $validFooterIcons = $this->getFooterIcons( "icononly" );
- $validFooterLinks = $this->getFooterLinks( "flat" ); //
Additional footer links
+ $validFooterIcons = $this->getFooterIcons( 'icononly' );
+ $validFooterLinks = $this->getFooterLinks( 'flat' ); //
Additional footer links
if ( count( $validFooterIcons ) + count( $validFooterLinks ) >
0 ) {
?>
@@ -368,8 +360,7 @@
<div id="f-<?php echo htmlspecialchars( $blockName );
?>ico" class="footer-icons">
<?php
foreach ( $footerIcons as $icon ) {
- ?>
- <?php echo $this->getSkin()->makeFooterIcon(
$icon );
+ echo $this->getSkin()->makeFooterIcon( $icon );
}
?>
</div>
--
To view, visit https://gerrit.wikimedia.org/r/225212
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ie83c6520575eaa706d728ac3078433a956b61c5c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/skins/GreyStuff
Gerrit-Branch: master
Gerrit-Owner: Jack Phoenix <[email protected]>
Gerrit-Reviewer: Isarra <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits