forward-ported $wgSkipSkin from REL1_4, with enhancements
authorTim Starling <tstarling@users.mediawiki.org>
Sun, 29 May 2005 06:18:10 +0000 (06:18 +0000)
committerTim Starling <tstarling@users.mediawiki.org>
Sun, 29 May 2005 06:18:10 +0000 (06:18 +0000)
includes/DefaultSettings.php
includes/Setup.php
includes/SpecialPreferences.php

index 051ac6d..40d125c 100644 (file)
@@ -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.
  */
index f410371..a9969dd 100644 (file)
@@ -102,6 +102,10 @@ if (!$wgUseOldExistenceCheck) {
        $wgEnablePersistentLC = false;
 }
 
+if ( $wgSkipSkin ) {
+       $wgSkipSkins[] = $wgSkipSkin;
+}
+
 wfProfileOut( $fname.'-misc1' );
 wfProfileIn( $fname.'-memcached' );
 
index cdd43ae..698216b 100644 (file)
@@ -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;