MediaWiki  REL1_19
index.php
Go to the documentation of this file.
00001 <?php
00008 define( 'MW_CONFIG_CALLBACK', 'Installer::overrideConfig' );
00009 define( 'MEDIAWIKI_INSTALL', true );
00010 
00011 chdir( dirname( dirname( __FILE__ ) ) );
00012 if ( isset( $_SERVER['MW_COMPILED'] ) ) {
00013         require ( 'phase3/includes/WebStart.php' );
00014 } else {
00015         require( dirname( dirname( __FILE__ ) ) . '/includes/WebStart.php' );
00016 }
00017 
00018 wfInstallerMain();
00019 
00020 function wfInstallerMain() {
00021         global $wgRequest, $wgLang, $wgMetaNamespace, $wgCanonicalNamespaceNames;
00022 
00023         $installer = new WebInstaller( $wgRequest );
00024 
00025         if ( !$installer->startSession() ) {
00026                 $installer->finish();
00027                 exit;
00028         }
00029 
00030         $fingerprint = $installer->getFingerprint();
00031         if ( isset( $_SESSION['installData'][$fingerprint] ) ) {
00032                 $session = $_SESSION['installData'][$fingerprint];
00033         } else {
00034                 $session = array();
00035         }
00036 
00037         if ( !is_null( $wgRequest->getVal( 'uselang' ) ) ) {
00038                 $langCode = $wgRequest->getVal( 'uselang' );
00039         } elseif ( isset( $session['settings']['_UserLang'] ) ) {
00040                 $langCode = $session['settings']['_UserLang'];
00041         } else {
00042                 $langCode = 'en';
00043         }
00044         $wgLang = Language::factory( $langCode );
00045 
00046         $installer->setParserLanguage( $wgLang );
00047 
00048         $wgMetaNamespace = $wgCanonicalNamespaceNames[NS_PROJECT];
00049 
00050         $session = $installer->execute( $session );
00051 
00052         $_SESSION['installData'][$fingerprint] = $session;
00053 
00054 }