blob: b8caa4d93f93e881c4b477519d3a64f39bc75670 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
<?php
if ( PHP_SAPI != 'cli' ) {
die( "This script can only be run from the command line.\n" );
}
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
$generator->generateAutoload( 'maintenance/generateLocalAutoload.php' );
|