From: Chad Horohoe Date: Wed, 5 Aug 2009 00:23:10 +0000 (+0000) Subject: Make this work by only loading things with a maintClass. X-Git-Tag: 1.31.0-rc.0~40500 X-Git-Url: https://git.cyclocoop.org/%28%28?a=commitdiff_plain;h=0d3604c2425e72dfc1bcb1094acf25dfeb6eae72;p=lhc%2Fweb%2Fwiklou.git Make this work by only loading things with a maintClass. --- 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; - */ } }