2014-09-26 23:13:23 +00:00
|
|
|
<?php
|
|
|
|
|
|
2014-11-14 22:27:16 +00:00
|
|
|
if ( PHP_SAPI != 'cli' ) {
|
|
|
|
|
die( "This script can only be run from the command line.\n" );
|
|
|
|
|
}
|
|
|
|
|
|
2014-09-26 23:13:23 +00:00
|
|
|
require_once __DIR__ . '/../includes/utils/AutoloadGenerator.php';
|
|
|
|
|
|
|
|
|
|
// Mediawiki installation directory
|
|
|
|
|
$base = dirname( __DIR__ );
|
|
|
|
|
|
|
|
|
|
$generator = new AutoloadGenerator( $base, 'local' );
|
|
|
|
|
foreach ( array( 'includes', 'languages', 'maintenance', 'mw-config' ) as $dir ) {
|
|
|
|
|
$generator->readDir( $base . '/' . $dir );
|
|
|
|
|
}
|
|
|
|
|
foreach ( glob( $base . '/*.php' ) as $file ) {
|
|
|
|
|
$generator->readFile( $file );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// This class is not defined, but might be added by the installer
|
|
|
|
|
$generator->forceClassPath( 'MyLocalSettingsGenerator', "$base/mw-config/overrides.php" );
|
|
|
|
|
|
|
|
|
|
// Write out the autoload
|
2014-11-14 19:00:36 +00:00
|
|
|
$generator->generateAutoload( 'maintenance/generateLocalAutoload.php' );
|
2014-09-26 23:13:23 +00:00
|
|
|
|