MediaWiki
REL1_22
|
00001 <?php 00023 define( 'MW_CONFIG_CALLBACK', 'Installer::overrideConfig' ); 00024 define( 'MEDIAWIKI_INSTALL', true ); 00025 00026 chdir( dirname( __DIR__ ) ); 00027 require dirname( __DIR__ ) . '/includes/WebStart.php'; 00028 00029 wfInstallerMain(); 00030 00031 function wfInstallerMain() { 00032 global $wgRequest, $wgLang, $wgMetaNamespace, $wgCanonicalNamespaceNames; 00033 00034 $installer = InstallerOverrides::getWebInstaller( $wgRequest ); 00035 00036 if ( !$installer->startSession() ) { 00037 $installer->finish(); 00038 exit; 00039 } 00040 00041 $fingerprint = $installer->getFingerprint(); 00042 if ( isset( $_SESSION['installData'][$fingerprint] ) ) { 00043 $session = $_SESSION['installData'][$fingerprint]; 00044 } else { 00045 $session = array(); 00046 } 00047 00048 if ( !is_null( $wgRequest->getVal( 'uselang' ) ) ) { 00049 $langCode = $wgRequest->getVal( 'uselang' ); 00050 } elseif ( isset( $session['settings']['_UserLang'] ) ) { 00051 $langCode = $session['settings']['_UserLang']; 00052 } else { 00053 $langCode = 'en'; 00054 } 00055 $wgLang = Language::factory( $langCode ); 00056 00057 $installer->setParserLanguage( $wgLang ); 00058 00059 $wgMetaNamespace = $wgCanonicalNamespaceNames[NS_PROJECT]; 00060 00061 $session = $installer->execute( $session ); 00062 00063 $_SESSION['installData'][$fingerprint] = $session; 00064 00065 }