From 6944ef5b4e29da51a3ace541b9d63204f604a1e9 Mon Sep 17 00:00:00 2001 From: Tim Starling Date: Sun, 29 May 2005 06:18:10 +0000 Subject: [PATCH] forward-ported $wgSkipSkin from REL1_4, with enhancements --- includes/DefaultSettings.php | 15 +++++++++++---- includes/Setup.php | 4 ++++ includes/SpecialPreferences.php | 7 ++++--- 3 files changed, 19 insertions(+), 7 deletions(-) diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php index 051ac6da58..40d125cdff 100644 --- a/includes/DefaultSettings.php +++ b/includes/DefaultSettings.php @@ -1046,7 +1046,7 @@ $wgSVGConverter = 'ImageMagick'; /** If not in the executable PATH, specify */ $wgSVGConverterPath = ''; -/** @todo FIXME what does it do here ?? [ashar] */ +/** Set $wgCommandLineMode if it's not set already, to avoid notices */ if( !isset( $wgCommandLineMode ) ) { $wgCommandLineMode = false; } @@ -1330,9 +1330,7 @@ $wgLocaltimezone = null; */ $wgAnonGroupId = 1; $wgLoggedInGroupId = 2; -$wgSysopGroupId = 3; -$wgBureaucratGroupId = 4; -$wgStewardGroupId = 5; + /** * When translating messages with wfMsg(), it is not always clear what should be @@ -1419,6 +1417,15 @@ $wgUseExternalEditor = true; $wgSortSpecialPages = true; +/** + * Specify the name of a skin that should not be presented in the + * list of available skins. + * Use for blacklisting a skin which you do not want to remove + * from the .../skins/ directory + */ +$wgSkipSkin = ''; +$wgSkipSkins = array(); # More of the same + /** * Array of disabled article actions, e.g. view, edit, dublincore, delete, etc. */ diff --git a/includes/Setup.php b/includes/Setup.php index f410371ec2..a9969ddedf 100644 --- a/includes/Setup.php +++ b/includes/Setup.php @@ -102,6 +102,10 @@ if (!$wgUseOldExistenceCheck) { $wgEnablePersistentLC = false; } +if ( $wgSkipSkin ) { + $wgSkipSkins[] = $wgSkipSkin; +} + wfProfileOut( $fname.'-misc1' ); wfProfileIn( $fname.'-memcached' ); diff --git a/includes/SpecialPreferences.php b/includes/SpecialPreferences.php index cdd43aee3b..698216b446 100644 --- a/includes/SpecialPreferences.php +++ b/includes/SpecialPreferences.php @@ -384,7 +384,7 @@ class PreferencesForm { global $wgEnotifWatchlist, $wgEnotifUserTalk,$wgEnotifMinorEdits; global $wgRCShowWatchingUsers, $wgEnotifRevealEditorAddress; global $wgEnableEmail, $wgEnableUserEmail, $wgEmailAuthentication; - global $wgContLanguageCode; + global $wgContLanguageCode, $wgDefaultSkin, $wgSkipSkins; $wgOut->setPageTitle( wfMsg( 'preferences' ) ); $wgOut->setArticleRelated( false ); @@ -586,8 +586,9 @@ class PreferencesForm { # Only show members of $wgValidSkinNames rather than # $skinNames (skins is all skin names from Language.php) foreach ($wgValidSkinNames as $skinkey => $skinname ) { - global $wgDefaultSkin; - + if ( in_array( $skinkey, $wgSkipSkins ) ) { + continue; + } $checked = $skinkey == $this->mSkin ? ' checked="checked"' : ''; $sn = isset( $skinNames[$skinkey] ) ? $skinNames[$skinkey] : $skinname; -- 2.20.1