Index: branches/new-installer/phase3/maintenance/install.php |
— | — | @@ -0,0 +1,49 @@ |
| 2 | +<?php |
| 3 | + |
| 4 | +if ( php_sapi_name() != 'cli' ) { |
| 5 | + echo "This is a command-line script.\n"; |
| 6 | + exit( 1 ); |
| 7 | +} |
| 8 | + |
| 9 | +define( 'MEDIAWIKI', 1 ); |
| 10 | +define( 'MW_NO_DB', 1 ); |
| 11 | +define( 'MW_NO_SESSION', 1 ); |
| 12 | +define( 'MW_CONFIG_CALLBACK', 'wfInstallerConfig' ); |
| 13 | + |
| 14 | +$IP = dirname( dirname( __FILE__ ) ); |
| 15 | + |
| 16 | +function wfInstallerConfig() { |
| 17 | + // Don't access the database |
| 18 | + $GLOBALS['wgUseDatabaseMessages'] = false; |
| 19 | + // Debug-friendly |
| 20 | + $GLOBALS['wgShowExceptionDetails'] = true; |
| 21 | + // Don't break forms |
| 22 | + $GLOBALS['wgExternalLinkTarget'] = '_blank'; |
| 23 | +} |
| 24 | + |
| 25 | +require_once( "$IP/includes/ProfilerStub.php" ); |
| 26 | +require_once( "$IP/includes/Defines.php" ); |
| 27 | +require_once( "$IP/includes/GlobalFunctions.php" ); |
| 28 | +require_once( "$IP/includes/AutoLoader.php" ); |
| 29 | +require_once( "$IP/includes/Hooks.php" ); |
| 30 | +require_once( "$IP/includes/DefaultSettings.php" ); |
| 31 | +require_once( "$IP/includes/Namespace.php" ); |
| 32 | + |
| 33 | +$wgContLang = Language::factory( 'en' ); // will be overridden later |
| 34 | + |
| 35 | +// Disable the i18n cache and LoadBalancer |
| 36 | +Language::getLocalisationCache()->disableBackend(); |
| 37 | +LBFactory::disableBackend(); |
| 38 | + |
| 39 | +$installer = new CliInstaller( $argv ); |
| 40 | + |
| 41 | +$langCode = 'en'; |
| 42 | + |
| 43 | +$wgLang = Language::factory( $langCode ); |
| 44 | + |
| 45 | +$wgMetaNamespace = $wgCanonicalNamespaceNames[NS_PROJECT]; |
| 46 | + |
| 47 | +$session = $installer->execute( $argv ); |
| 48 | + |
| 49 | +$_SESSION['installData'] = $session; |
| 50 | + |
Property changes on: branches/new-installer/phase3/maintenance/install.php |
___________________________________________________________________ |
Name: svn:eol-style |
1 | 51 | + native |