Waldir has uploaded a new change for review.

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


Change subject: Rename Skin::getUsableSkins() to Skin::getAllowedSkins()
......................................................................

Rename Skin::getUsableSkins() to Skin::getAllowedSkins()

Follow-up to change 65426 (commit a3c7a8b8f)

Change-Id: I0b0fdfb5615c22aa876882c3ca344ebb1f10c4bd
---
M includes/Preferences.php
M includes/Skin.php
M includes/api/ApiQuerySiteinfo.php
3 files changed, 5 insertions(+), 6 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/46/65446/1

diff --git a/includes/Preferences.php b/includes/Preferences.php
index a6d530f..df80894 100644
--- a/includes/Preferences.php
+++ b/includes/Preferences.php
@@ -1074,9 +1074,8 @@
                $mptitle = Title::newMainPage();
                $previewtext = $context->msg( 'skin-preview' )->text();
 
-               # Only show members of Skin::getSkinNames() rather than
-               # $skinNames (skins is all skin names from Language.php)
-               $validSkinNames = Skin::getUsableSkins();
+               # Only show skins that aren't disabled in $wgSkipSkins
+               $validSkinNames = Skin::getAllowedSkins();
 
                # Sort by UI skin name. First though need to update 
validSkinNames as sometimes
                # the skinkey & UI skinname differ (e.g. "standard" skinkey is 
"Classic" in the UI).
diff --git a/includes/Skin.php b/includes/Skin.php
index 15b8545..0bc7c3e 100644
--- a/includes/Skin.php
+++ b/includes/Skin.php
@@ -93,7 +93,7 @@
         * only want to show skins users _can_ use.
         * @return array of strings
         */
-       public static function getUsableSkins() {
+       public static function getAllowedSkins() {
                global $wgSkipSkins;
 
                $allowedSkins = self::getSkinNames();
diff --git a/includes/api/ApiQuerySiteinfo.php 
b/includes/api/ApiQuerySiteinfo.php
index 09a0f3d..30d2425 100644
--- a/includes/api/ApiQuerySiteinfo.php
+++ b/includes/api/ApiQuerySiteinfo.php
@@ -544,12 +544,12 @@
 
        public function appendSkins( $property ) {
                $data = array();
-               $usable = Skin::getUsableSkins();
+               $allowed = Skin::getAllowedSkins();
                $default = Skin::normalizeKey( 'default' );
                foreach ( Skin::getSkinNames() as $name => $displayName ) {
                        $skin = array( 'code' => $name );
                        ApiResult::setContent( $skin, $displayName );
-                       if ( !isset( $usable[$name] ) ) {
+                       if ( !isset( $allowed[$name] ) ) {
                                $skin['unusable'] = '';
                        }
                        if ( $name === $default ) {

-- 
To view, visit https://gerrit.wikimedia.org/r/65446
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0b0fdfb5615c22aa876882c3ca344ebb1f10c4bd
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Waldir <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to