From a3c7a8b8f49c3d3f8df5d12e87465fa94f9fef6e Mon Sep 17 00:00:00 2001 From: Waldir Pimenta Date: Sat, 25 May 2013 12:10:34 +0100 Subject: [PATCH] Rename $usableSkins to $allowedSkins This change is entirely in local scope. The function is still called getUsableSkins() so this change won't break anything. But the variable name and the updated documentation comment make it clearer what the purpose of this function is, for anyone reading the code or reading the autogenerated docs. This change also includes minor changes to documentation in skin-related files (typos and small edits for clarity). Change-Id: I4220408f4d3b64cf87be4ad1af4b72d3a4524922 --- docs/skin.txt | 15 ++++++++------- includes/Skin.php | 10 +++++----- skins/Vector.php | 2 +- 3 files changed, 14 insertions(+), 13 deletions(-) diff --git a/docs/skin.txt b/docs/skin.txt index 2f414cb3e3..1459d7afd0 100644 --- a/docs/skin.txt +++ b/docs/skin.txt @@ -13,8 +13,9 @@ MediaWiki includes four core skins: * Modern: An attractive blue/grey theme with sidebar and top bar. Derived from Monobook. -* Cologne Blue: A lightweight skin with minimal formatting. The oldest of - currently bundled skins, largely rewritten in 2012 while keeping the looks. +* Cologne Blue: A lightweight skin with minimal formatting. The oldest of the + currently bundled skins, largely rewritten in 2012 while keeping its + appearance. Several legacy skins were removed in the 1.22 release, as the burden of @@ -27,20 +28,20 @@ supporting them became too heavy to bear. Those were: This skin is now used for the old Wikipedia snapshot at http://nostalgia.wikipedia.org/ -* Chick: A lightweight Monobook skin with no sidebar, the sidebar links were +* Chick: A lightweight Monobook skin with no sidebar. The sidebar links were given at the bottom of the page instead. * Simple: A lightweight skin with a simple white-background sidebar and no top bar. -* MySkin: Monobook without the CSS. The idea was that you customise it using - user or site CSS. +* MySkin: Essentially Monobook without the CSS. The idea was that it could be + customised using user-specific or site-wide CSS (see below). == Custom CSS/JS == It is possible to customise the site CSS and JavaScript without editing any -source files. This is done by editing some pages on the wiki: +server-side source files. This is done by editing some pages on the wiki: * [[MediaWiki:Common.css]] -- for skin-independent CSS * [[MediaWiki:Common.js]] -- for skin-independent JavaScript @@ -73,7 +74,7 @@ $wgSkipSkins[] = ''; This technique is used by the more ambitious MediaWiki site operators, to create complex custom skins for their wikis. It should be preferred over -editing the core Monobook skin directly. +editing the core Monobook skin directly. See http://www.mediawiki.org/wiki/Manual:Skinning for more information. diff --git a/includes/Skin.php b/includes/Skin.php index 245fac2a59..15b85453b7 100644 --- a/includes/Skin.php +++ b/includes/Skin.php @@ -25,7 +25,7 @@ */ /** - * The main skin class that provide methods and properties for all other skins. + * The main skin class which provides methods and properties for all other skins. * This base class is also the "Standard" skin. * * See docs/skin.txt for more information. @@ -88,7 +88,7 @@ abstract class Skin extends ContextSource { } /** - * Fetch the list of usable skins in regards to $wgSkipSkins. + * Fetch the list of user-selectable skins in regards to $wgSkipSkins. * Useful for Special:Preferences and other places where you * only want to show skins users _can_ use. * @return array of strings @@ -96,13 +96,13 @@ abstract class Skin extends ContextSource { public static function getUsableSkins() { global $wgSkipSkins; - $usableSkins = self::getSkinNames(); + $allowedSkins = self::getSkinNames(); foreach ( $wgSkipSkins as $skip ) { - unset( $usableSkins[$skip] ); + unset( $allowedSkins[$skip] ); } - return $usableSkins; + return $allowedSkins; } /** diff --git a/skins/Vector.php b/skins/Vector.php index d477c6595a..ad309bad26 100644 --- a/skins/Vector.php +++ b/skins/Vector.php @@ -48,7 +48,7 @@ class SkinVector extends SkinTemplate { parent::initPage( $out ); // Append CSS which includes IE only behavior fixes for hover support - - // this is better than including this in a CSS fille since it doesn't + // this is better than including this in a CSS file since it doesn't // wait for the CSS file to load before fetching the HTC file. $min = $this->getRequest()->getFuzzyBool( 'debug' ) ? '' : '.min'; $out->addHeadItem( 'csshover', -- 2.20.1