HipHop improvements:
[lhc/web/wiklou.git] / load.php
index ff6d9d7..2fc48fc 100644 (file)
--- a/load.php
+++ b/load.php
@@ -30,17 +30,18 @@ function wfDie( $msg = '' ) {
        die( 1 );
 }
 
-// Load global constants, including MW_VERSION and MW_MIN_PHP_VERSION
-require_once( dirname( __FILE__ ) . '/includes/Defines.php' );
-
 // Die on unsupported PHP versions
-if( !function_exists( 'version_compare' ) || version_compare( phpversion(), MW_MIN_PHP_VERSION ) < 0 ){
-       $version = htmlspecialchars( MW_VERSION );
-       $phpversion = htmlspecialchars( MW_MIN_PHP_VERSION );
-       wfDie( "MediaWiki $version requires at least PHP version $phpversion." );
+if( !function_exists( 'version_compare' ) || version_compare( phpversion(), '5.2.3' ) < 0 ){
+       $version = htmlspecialchars( $wgVersion );
+       wfDie( "MediaWiki $version requires at least PHP version 5.2.3." );
+}
+
+if ( isset( $_SERVER['MW_COMPILED'] ) ) {
+       require ( 'phase3/includes/WebStart.php' );
+} else {
+       require ( dirname( __FILE__ ) . '/includes/WebStart.php' );
 }
 
-require ( dirname( __FILE__ ) . '/includes/WebStart.php' );
 wfProfileIn( 'load.php' );
 
 // URL safety checks