- * If a skin can't be found, it will fall back to the configured
- * default, or the hardcoded default if that's broken.
+ *
+ * If a skin can't be found, it will fall back to the configured default ($wgDefaultSkin), or the
+ * hardcoded default ($wgFallbackSkin) if the default skin is unavailable too.
+ *
* @param string $key 'monobook', 'vector', etc.
* @return string
*/
static function normalizeKey( $key ) {
* @param string $key 'monobook', 'vector', etc.
* @return string
*/
static function normalizeKey( $key ) {
$skinNames = Skin::getSkinNames();
// Make keys lowercase for case-insensitive matching.
$skinNames = array_change_key_case( $skinNames, CASE_LOWER );
$key = strtolower( $key );
$skinNames = Skin::getSkinNames();
// Make keys lowercase for case-insensitive matching.
$skinNames = array_change_key_case( $skinNames, CASE_LOWER );
$key = strtolower( $key );
if ( $key == '' || $key == 'default' ) {
// Don't return the default immediately;
// in a misconfiguration we need to fall back.
if ( $key == '' || $key == 'default' ) {
// Don't return the default immediately;
// in a misconfiguration we need to fall back.
# except by SQL manipulation if a previously valid skin name
# is no longer valid.
wfDebug( "Skin class does not exist: $className\n" );
# except by SQL manipulation if a previously valid skin name
# is no longer valid.
wfDebug( "Skin class does not exist: $className\n" );