* @file
*/
-// Load global constants, including MW_VERSION and MW_MIN_PHP_VERSION
-require_once( dirname( __FILE__ ) . '/includes/Defines.php' );
-
// Bail on old versions of PHP. Pretty much every other file in the codebase
// has structures (try/catch, foo()->bar(), etc etc) which throw parse errors in PHP 4.
// Setup.php and ObjectCache.php have structures invalid in PHP 5.0 and 5.1, respectively.
-if ( !function_exists( 'version_compare' ) || version_compare( phpversion(), MW_MIN_PHP_VERSION ) < 0 ) {
+if ( !function_exists( 'version_compare' ) || version_compare( phpversion(), '5.2.3' ) < 0 ) {
$phpversion = htmlspecialchars( phpversion() );
- $reqVersion = htmlspecialchars( MW_MIN_PHP_VERSION );
$errorMsg = <<<ENDL
<p>
- MediaWiki requires PHP $reqVersion or higher. You are running PHP $phpversion.
+ MediaWiki requires PHP 5.2.3 or higher. You are running PHP $phpversion.
</p>
<p>
Please consider <a href="http://www.php.net/downloads.php">upgrading your copy of PHP</a>.
wfProfileOut( 'index.php-filecache' );
}
-# Setting global variables in mediaWiki
-$mediaWiki->setVal( 'DisableHardRedirects', $wgDisableHardRedirects );
-$mediaWiki->setVal( 'EnableCreativeCommonsRdf', $wgEnableCreativeCommonsRdf );
-$mediaWiki->setVal( 'EnableDublinCoreRdf', $wgEnableDublinCoreRdf );
-$mediaWiki->setVal( 'Server', $wgServer );
-$mediaWiki->setVal( 'SquidMaxage', $wgSquidMaxage );
-$mediaWiki->setVal( 'UseExternalEditor', $wgUseExternalEditor );
-$mediaWiki->setVal( 'UsePathInfo', $wgUsePathInfo );
-
$mediaWiki->performRequestForTitle( $wgArticle );
$mediaWiki->finalCleanup();
* @param $errorMsg String fully-escaped HTML
*/
function wfDie( $errorMsg ){
- global $wgLogo;
- $version = htmlspecialchars( MW_VERSION );
+ // Use the version set in DefaultSettings if possible, but don't rely on it
+ global $wgVersion, $wgLogo;
+ $version = isset( $wgVersion ) && $wgVersion
+ ? htmlspecialchars( $wgVersion )
+ : '';
$logo = isset( $wgLogo ) && $wgLogo
? $wgLogo
: 'http://upload.wikimedia.org/wikipedia/commons/1/1c/MediaWiki_logo.png';
</html>
<?php
die( 1 );
-}
\ No newline at end of file
+}