}
return $wgValidSkinNames;
}
+
+ /**
+ * Fetch the list of usable 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
+ */
+ public static function getUsableSkins() {
+ global $wgSkipSkins;
+ $usableSkins = self::getSkinNames();
+ foreach ( $wgSkipSkins as $skip ) {
+ unset( $usableSkins[$skip] );
+ }
+ return $usableSkins;
+ }
/**
* Normalize a skin preference value to a form that can be loaded.
global $wgEnotifWatchlist, $wgEnotifUserTalk,$wgEnotifMinorEdits;
global $wgRCShowWatchingUsers, $wgEnotifRevealEditorAddress;
global $wgEnableEmail, $wgEnableUserEmail, $wgEmailAuthentication;
- global $wgContLanguageCode, $wgDefaultSkin, $wgSkipSkins, $wgAuth;
+ global $wgContLanguageCode, $wgDefaultSkin, $wgAuth;
global $wgEmailConfirmToEdit, $wgAjaxSearch, $wgEnableMWSuggest;
$wgOut->setPageTitle( wfMsg( 'preferences' ) );
$previewtext = wfMsg('skin-preview');
# Only show members of Skin::getSkinNames() rather than
# $skinNames (skins is all skin names from Language.php)
- $validSkinNames = Skin::getSkinNames();
+ $validSkinNames = Skin::getUsableSkins();
# 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).
foreach ($validSkinNames as $skinkey => & $skinname ) {
}
asort($validSkinNames);
foreach ($validSkinNames as $skinkey => $sn ) {
- if ( in_array( $skinkey, $wgSkipSkins ) ) {
- continue;
- }
$checked = $skinkey == $this->mSkin ? ' checked="checked"' : '';
$mplink = htmlspecialchars($mptitle->getLocalURL("useskin=$skinkey"));