From 0d3604c2425e72dfc1bcb1094acf25dfeb6eae72 Mon Sep 17 00:00:00 2001 From: Chad Horohoe Date: Wed, 5 Aug 2009 00:23:10 +0000 Subject: [PATCH] Make this work by only loading things with a maintClass. --- maintenance/Maintenance.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/maintenance/Maintenance.php b/maintenance/Maintenance.php index 4cc49d68bb..4616c71ae4 100644 --- a/maintenance/Maintenance.php +++ b/maintenance/Maintenance.php @@ -728,8 +728,6 @@ abstract class Maintenance { * @return array */ private static function getCoreScripts() { - return array(); - /** if( !self::$mCoreScripts ) { self::disableSetup(); $paths = array( @@ -742,8 +740,11 @@ abstract class Maintenance { foreach( $paths as $p ) { $handle = opendir( $p ); while( ( $file = readdir( $handle ) ) !== false ) { + if( $file == 'Maintenance.php' ) + continue; $file = $p . '/' . $file; - if( is_dir( $file ) || !strpos( $file, '.php' ) ) { + if( is_dir( $file ) || !strpos( $file, '.php' ) || + ( strpos( file_get_contents( $file ), '$maintClass' ) === false ) ) { continue; } require( $file ); @@ -756,6 +757,5 @@ abstract class Maintenance { } } return self::$mCoreScripts; - */ } } -- 2.20.1