Index: trunk/phase3/includes/Skin.php |
— | — | @@ -123,7 +123,7 @@ |
124 | 124 | * @static |
125 | 125 | */ |
126 | 126 | static function &newFromKey( $key ) { |
127 | | - global $wgStyleDirectory; |
| 127 | + global $wgStyleDirectory, $wgAutoloadClasses; |
128 | 128 | |
129 | 129 | $key = Skin::normalizeKey( $key ); |
130 | 130 | |
— | — | @@ -132,7 +132,8 @@ |
133 | 133 | $className = 'Skin'.ucfirst($key); |
134 | 134 | |
135 | 135 | # Grab the skin class and initialise it. |
136 | | - if ( !class_exists( $className, false ) ) { |
| 136 | + # Use autoloader if it is set in $wgAutoloadClasses. |
| 137 | + if( !class_exists( $className, isset($wgAutoloadClasses[$className]) ) ) { |
137 | 138 | // Preload base classes to work around APC/PHP5 bug |
138 | 139 | $deps = "{$wgStyleDirectory}/{$skinName}.deps.php"; |
139 | 140 | if( file_exists( $deps ) ) include_once( $deps ); |