From 88d407ed9ea034a9b8c225f6aaac261965d8ecfe Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Mon, 8 Dec 2008 11:48:08 +0000 Subject: [PATCH] Tweak r44296: use autoloader if it is set there --- includes/Skin.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/includes/Skin.php b/includes/Skin.php index a17261b840..2ae8d27870 100644 --- a/includes/Skin.php +++ b/includes/Skin.php @@ -123,7 +123,7 @@ class Skin extends Linker { * @static */ static function &newFromKey( $key ) { - global $wgStyleDirectory; + global $wgStyleDirectory, $wgAutoloadClasses; $key = Skin::normalizeKey( $key ); @@ -132,7 +132,8 @@ class Skin extends Linker { $className = 'Skin'.ucfirst($key); # Grab the skin class and initialise it. - if ( !class_exists( $className, false ) ) { + # Use autoloader if it is set in $wgAutoloadClasses. + if( !class_exists( $className, isset($wgAutoloadClasses[$className]) ) ) { // Preload base classes to work around APC/PHP5 bug $deps = "{$wgStyleDirectory}/{$skinName}.deps.php"; if( file_exists( $deps ) ) include_once( $deps ); -- 2.20.1