MediaWiki
REL1_20
|
00001 <?php 00039 # Bail on old versions of PHP. Pretty much every other file in the codebase 00040 # has structures (try/catch, foo()->bar(), etc etc) which throw parse errors in 00041 # PHP 4. Setup.php and ObjectCache.php have structures invalid in PHP 5.0 and 00042 # 5.1, respectively. 00043 if ( !function_exists( 'version_compare' ) || version_compare( phpversion(), '5.3.2' ) < 0 ) { 00044 // We need to use dirname( __FILE__ ) here cause __DIR__ is PHP5.3+ 00045 require( dirname( __FILE__ ) . '/includes/PHPVersionError.php' ); 00046 wfPHPVersionError( 'index.php' ); 00047 } 00048 00049 # Initialise common code. This gives us access to GlobalFunctions, the 00050 # AutoLoader, and the globals $wgRequest, $wgOut, $wgUser, $wgLang and 00051 # $wgContLang, amongst others; it does *not* load $wgTitle 00052 if ( isset( $_SERVER['MW_COMPILED'] ) ) { 00053 require ( 'phase3/includes/WebStart.php' ); 00054 } else { 00055 require ( __DIR__ . '/includes/WebStart.php' ); 00056 } 00057 00058 $mediaWiki = new MediaWiki(); 00059 $mediaWiki->run();