Merge "OutputPage: Use PageViewLanguage instead of PageLanguage for mw.config"
[lhc/web/wiklou.git] / maintenance / generateLocalAutoload.php
1 <?php
2
3 if ( PHP_SAPI != 'cli' ) {
4 die( "This script can only be run from the command line.\n" );
5 }
6
7 require_once __DIR__ . '/../includes/utils/AutoloadGenerator.php';
8
9 // Mediawiki installation directory
10 $base = dirname( __DIR__ );
11
12 $generator = new AutoloadGenerator( $base, 'local' );
13 foreach ( [ 'includes', 'languages', 'maintenance', 'mw-config' ] as $dir ) {
14 $generator->readDir( $base . '/' . $dir );
15 }
16 foreach ( glob( $base . '/*.php' ) as $file ) {
17 $generator->readFile( $file );
18 }
19
20 // This class is not defined, but might be added by the installer
21 $generator->forceClassPath( 'MyLocalSettingsGenerator', "$base/mw-config/overrides.php" );
22
23 // Write out the autoload
24 $generator->generateAutoload( 'maintenance/generateLocalAutoload.php' );