http://www.mediawiki.org/wiki/Special:Code/MediaWiki/88176

Revision: 88176
Author:   tstarling
Date:     2011-05-15 13:21:16 +0000 (Sun, 15 May 2011)
Log Message:
-----------
Revert r87635, r87637, r87639, r87643 (MW_MIN_PHP_VERSION etc.): breaks HipHop 
support.

Modified Paths:
--------------
    trunk/phase3/api.php
    trunk/phase3/includes/DefaultSettings.php
    trunk/phase3/includes/Defines.php
    trunk/phase3/includes/Export.php
    trunk/phase3/includes/Feed.php
    trunk/phase3/includes/GlobalFunctions.php
    trunk/phase3/includes/HttpFunctions.php
    trunk/phase3/includes/OutputPage.php
    trunk/phase3/includes/Setup.php
    trunk/phase3/includes/installer/DatabaseUpdater.php
    trunk/phase3/includes/installer/Installer.php
    trunk/phase3/includes/installer/MysqlInstaller.php
    trunk/phase3/includes/installer/OracleInstaller.php
    trunk/phase3/includes/installer/WebInstallerOutput.php
    trunk/phase3/includes/resourceloader/ResourceLoaderStartUpModule.php
    trunk/phase3/includes/specials/SpecialVersion.php
    trunk/phase3/index.php
    trunk/phase3/load.php
    trunk/phase3/maintenance/Maintenance.php
    trunk/phase3/maintenance/install.php
    trunk/phase3/maintenance/update.php
    trunk/phase3/tests/parserTests.php

Modified: trunk/phase3/api.php
===================================================================
--- trunk/phase3/api.php        2011-05-15 13:20:34 UTC (rev 88175)
+++ trunk/phase3/api.php        2011-05-15 13:21:16 UTC (rev 88176)
@@ -37,9 +37,6 @@
 // So extensions (and other code) can check whether they're running in API mode
 define( 'MW_API', true );
 
-// Include global constants, including MW_VERSION and MW_MIN_PHP_VERSION
-require_once( dirname( __FILE__ ) . '/includes/Defines.php' );
-
 // We want a plain message on catastrophic errors that machines can identify
 function wfDie( $msg = '' ) {
        header( $_SERVER['SERVER_PROTOCOL'] . ' 500 MediaWiki configuration 
Error', true, 500 );
@@ -48,10 +45,9 @@
 }
 
 // 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." );
 }
 
 // Initialise common code.

Modified: trunk/phase3/includes/DefaultSettings.php
===================================================================
--- trunk/phase3/includes/DefaultSettings.php   2011-05-15 13:20:34 UTC (rev 
88175)
+++ trunk/phase3/includes/DefaultSettings.php   2011-05-15 13:21:16 UTC (rev 
88176)
@@ -33,11 +33,8 @@
 $wgConf = new SiteConfiguration;
 /** @endcond */
 
-/**
- * MediaWiki version number
- * @deprecated use the constant MW_VERSION instead
- */
-$wgVersion = MW_VERSION;
+/** MediaWiki version number */
+$wgVersion = '1.19alpha';
 
 /** Name of the site. It must be changed in LocalSettings.php */
 $wgSitename         = 'MediaWiki';
@@ -4345,16 +4342,6 @@
 /** Provide syndication feeds (RSS, Atom) for, e.g., Recentchanges, Newpages */
 $wgFeed = true;
 
-/**
- * Available feeds objects
- * Should probably only be defined when a page is syndicated ie when
- * $wgOut->isSyndicated() is true
- */
-$wgFeedClasses = array(
-       'rss' => 'RSSFeed',
-       'atom' => 'AtomFeed',
-);
-
 /** Set maximum number of results to return in syndication feeds (RSS, Atom) 
for
  * eg Recentchanges, Newpages. */
 $wgFeedLimit = 50;

Modified: trunk/phase3/includes/Defines.php
===================================================================
--- trunk/phase3/includes/Defines.php   2011-05-15 13:20:34 UTC (rev 88175)
+++ trunk/phase3/includes/Defines.php   2011-05-15 13:21:16 UTC (rev 88176)
@@ -1,8 +1,6 @@
 <?php
 /**
- * Global constants declarations.  Do *NOT* include *anything* in this file 
which is
- * not a define() declaration; this file is included in all sorts of scopes 
and must
- * be parseable by PHP 4 without errors.
+ * A few constants that might be needed during LocalSettings.php.
  *
  * Note: these constants must all be resolvable at compile time by HipHop, 
  * since this file will not be executed during request startup for a compiled
@@ -11,23 +9,11 @@
  * @file
  */
 
-/**@{
+/**
  * Version constants for the benefit of extensions
  */
-define( 'MW_VERSION', '1.19alpha' );
 define( 'MW_SPECIALPAGE_VERSION', 2 );
 
-/**
- * Minimum version of PHP required to run; entry points will die
- * if they try to run on a version older than this
- */
-define( 'MW_MIN_PHP_VERSION', '5.2.3' );
-
-define( 'MW_MIN_MYSQL_VERSION', '4.0.14' );
-define( 'MW_MIN_ORACLE_VERSION', '9.0.1' );
-
-/**@}*/
-
 /**@{
  * Database related constants
  */
@@ -99,6 +85,16 @@
 define( 'NS_IMAGE_TALK', NS_FILE_TALK );
 /**@}*/
 
+/**
+ * Available feeds objects
+ * Should probably only be defined when a page is syndicated ie when
+ * $wgOut->isSyndicated() is true
+ */
+$wgFeedClasses = array(
+       'rss' => 'RSSFeed',
+       'atom' => 'AtomFeed',
+);
+
 /**@{
  * Cache type
  */

Modified: trunk/phase3/includes/Export.php
===================================================================
--- trunk/phase3/includes/Export.php    2011-05-15 13:20:34 UTC (rev 88175)
+++ trunk/phase3/includes/Export.php    2011-05-15 13:21:16 UTC (rev 88176)
@@ -406,7 +406,8 @@
        }
 
        function generator() {
-               return Xml::element( 'generator', array(), "MediaWiki " . 
MW_VERSION );
+               global $wgVersion;
+               return Xml::element( 'generator', array(), "MediaWiki 
$wgVersion" );
        }
 
        function homelink() {

Modified: trunk/phase3/includes/Feed.php
===================================================================
--- trunk/phase3/includes/Feed.php      2011-05-15 13:20:34 UTC (rev 88175)
+++ trunk/phase3/includes/Feed.php      2011-05-15 13:21:16 UTC (rev 88176)
@@ -301,6 +301,7 @@
         * Ouput an RSS 2.0 header
         */
        function outHeader() {
+               global $wgVersion;
 
                $this->outXmlHeader();
                ?><rss version="2.0" 
xmlns:dc="http://purl.org/dc/elements/1.1/";>
@@ -309,7 +310,7 @@
                <link><?php print $this->getUrl() ?></link>
                <description><?php print $this->getDescription() 
?></description>
                <language><?php print $this->getLanguage() ?></language>
-               <generator>MediaWiki <?php print MW_VERSION ?></generator>
+               <generator>MediaWiki <?php print $wgVersion ?></generator>
                <lastBuildDate><?php print $this->formatTime( wfTimestampNow() 
) ?></lastBuildDate>
 <?php
        }
@@ -360,6 +361,8 @@
         * Outputs a basic header for Atom 1.0 feeds.
         */
        function outHeader() {
+               global $wgVersion;
+
                $this->outXmlHeader();
                ?><feed xmlns="http://www.w3.org/2005/Atom"; xml:lang="<?php 
print $this->getLanguage() ?>">
                <id><?php print $this->getFeedId() ?></id>
@@ -368,7 +371,7 @@
                <link rel="alternate" type="text/html" href="<?php print 
$this->getUrl() ?>"/>
                <updated><?php print $this->formatTime( wfTimestampNow() ) 
?>Z</updated>
                <subtitle><?php print $this->getDescription() ?></subtitle>
-               <generator>MediaWiki <?php print MW_VERSION ?></generator>
+               <generator>MediaWiki <?php print $wgVersion ?></generator>
 
 <?php
        }

Modified: trunk/phase3/includes/GlobalFunctions.php
===================================================================
--- trunk/phase3/includes/GlobalFunctions.php   2011-05-15 13:20:34 UTC (rev 
88175)
+++ trunk/phase3/includes/GlobalFunctions.php   2011-05-15 13:21:16 UTC (rev 
88176)
@@ -2500,8 +2500,10 @@
  *                 a float
  */
 function wfUseMW( $req_ver ) {
-       if ( version_compare( MW_VERSION, (string)$req_ver, '<' ) ) {
-               throw new MWException( "MediaWiki $req_ver required--this is 
only " . MW_VERSION );
+       global $wgVersion;
+
+       if ( version_compare( $wgVersion, (string)$req_ver, '<' ) ) {
+               throw new MWException( "MediaWiki $req_ver required--this is 
only $wgVersion" );
        }
 }
 

Modified: trunk/phase3/includes/HttpFunctions.php
===================================================================
--- trunk/phase3/includes/HttpFunctions.php     2011-05-15 13:20:34 UTC (rev 
88175)
+++ trunk/phase3/includes/HttpFunctions.php     2011-05-15 13:21:16 UTC (rev 
88176)
@@ -112,7 +112,8 @@
         * @return String
         */
        public static function userAgent() {
-               return "MediaWiki/" . MW_VERSION;
+               global $wgVersion;
+               return "MediaWiki/$wgVersion";
        }
 
        /**

Modified: trunk/phase3/includes/OutputPage.php
===================================================================
--- trunk/phase3/includes/OutputPage.php        2011-05-15 13:20:34 UTC (rev 
88175)
+++ trunk/phase3/includes/OutputPage.php        2011-05-15 13:21:16 UTC (rev 
88176)
@@ -2672,7 +2672,7 @@
         */
        public function getHeadLinks( Skin $sk, $addContentType = false ) {
                global $wgUniversalEditButton, $wgFavicon, $wgAppleTouchIcon, 
$wgEnableAPI,
-                       $wgSitename, $wgHtml5, $wgMimeType,
+                       $wgSitename, $wgVersion, $wgHtml5, $wgMimeType,
                        $wgFeed, $wgOverrideSiteFeed, $wgAdvertisedFeedTypes,
                        $wgEnableDublinCoreRdf, $wgEnableCreativeCommonsRdf,
                        $wgDisableLangConversion, $wgCanonicalLanguageLinks, 
$wgContLang,
@@ -2699,7 +2699,7 @@
 
                $tags[] = Html::element( 'meta', array(
                        'name' => 'generator',
-                       'content' => "MediaWiki " . MW_VERSION,
+                       'content' => "MediaWiki $wgVersion",
                ) );
 
                $p = "{$this->mIndexPolicy},{$this->mFollowPolicy}";

Modified: trunk/phase3/includes/Setup.php
===================================================================
--- trunk/phase3/includes/Setup.php     2011-05-15 13:20:34 UTC (rev 88175)
+++ trunk/phase3/includes/Setup.php     2011-05-15 13:21:16 UTC (rev 88176)
@@ -23,7 +23,6 @@
 wfProfileIn( $fname );
 
 // Check to see if we are at the file scope
-// FIXME: use a different test here, maybe a constant defined at the top of 
DefaultSettings.php?
 if ( !isset( $wgVersion ) ) {
        echo "Error, Setup.php must be included from the file scope, after 
DefaultSettings.php\n";
        die( 1 );

Modified: trunk/phase3/includes/installer/DatabaseUpdater.php
===================================================================
--- trunk/phase3/includes/installer/DatabaseUpdater.php 2011-05-15 13:20:34 UTC 
(rev 88175)
+++ trunk/phase3/includes/installer/DatabaseUpdater.php 2011-05-15 13:21:16 UTC 
(rev 88176)
@@ -191,6 +191,7 @@
         * @param $what Array: what updates to perform
         */
        public function doUpdates( $what = array( 'core', 'extensions', 'purge' 
) ) {
+               global $wgVersion;
 
                $what = array_flip( $what );
                if ( isset( $what['core'] ) ) {
@@ -201,7 +202,7 @@
                        $this->runUpdates( $this->getExtensionUpdates(), true );
                }
 
-               $this->setAppliedUpdates( MW_VERSION, $this->updates );
+               $this->setAppliedUpdates( $wgVersion, $this->updates );
 
                if( isset( $what['purge'] ) ) {
                        $this->purgeCache();

Modified: trunk/phase3/includes/installer/Installer.php
===================================================================
--- trunk/phase3/includes/installer/Installer.php       2011-05-15 13:20:34 UTC 
(rev 88175)
+++ trunk/phase3/includes/installer/Installer.php       2011-05-15 13:21:16 UTC 
(rev 88176)
@@ -24,8 +24,7 @@
 abstract class Installer {
 
        // This is the absolute minimum PHP version we can support
-       // @deprecated since 1.18
-       const MINIMUM_PHP_VERSION = MW_MIN_PHP_VERSION;
+       const MINIMUM_PHP_VERSION = '5.2.3';
 
        /**
         * @var array
@@ -379,11 +378,11 @@
         */
        public function doEnvironmentChecks() {
                $phpVersion = phpversion();
-               if( version_compare( $phpVersion, MW_MIN_PHP_VERSION, '>=' ) ) {
+               if( version_compare( $phpVersion, self::MINIMUM_PHP_VERSION, 
'>=' ) ) {
                        $this->showMessage( 'config-env-php', $phpVersion );
                        $good = true;
                } else {
-                       $this->showMessage( 'config-env-php-toolow', 
$phpVersion, MW_MIN_PHP_VERSION );
+                       $this->showMessage( 'config-env-php-toolow', 
$phpVersion, self::MINIMUM_PHP_VERSION );
                        $good = false;
                }
 

Modified: trunk/phase3/includes/installer/MysqlInstaller.php
===================================================================
--- trunk/phase3/includes/installer/MysqlInstaller.php  2011-05-15 13:20:34 UTC 
(rev 88175)
+++ trunk/phase3/includes/installer/MysqlInstaller.php  2011-05-15 13:21:16 UTC 
(rev 88176)
@@ -31,6 +31,8 @@
 
        public $supportedEngines = array( 'InnoDB', 'MyISAM' );
 
+       public $minimumVersion = '4.0.14';
+
        public $webUserPrivs = array(
                'DELETE',
                'INSERT',
@@ -102,8 +104,8 @@
 
                // Check version
                $version = $conn->getServerVersion();
-               if ( version_compare( $version, MW_MIN_MYSQL_VERSION ) < 0 ) {
-                       return Status::newFatal( 'config-mysql-old', 
MW_MIN_MYSQL_VERSION, $version );
+               if ( version_compare( $version, $this->minimumVersion ) < 0 ) {
+                       return Status::newFatal( 'config-mysql-old', 
$this->minimumVersion, $version );
                }
 
                return $status;

Modified: trunk/phase3/includes/installer/OracleInstaller.php
===================================================================
--- trunk/phase3/includes/installer/OracleInstaller.php 2011-05-15 13:20:34 UTC 
(rev 88175)
+++ trunk/phase3/includes/installer/OracleInstaller.php 2011-05-15 13:21:16 UTC 
(rev 88176)
@@ -26,6 +26,8 @@
                '_OracleDefTS' => 'USERS',
                '_OracleTempTS' => 'TEMP'
        );
+       
+       public $minimumVersion = '9.0.1'; // 9iR1
 
        protected $connError = null;
 
@@ -118,8 +120,8 @@
 
                // Check version
                $version = $conn->getServerVersion();
-               if ( version_compare( $version, MW_MIN_ORACLE_VERSION ) < 0 ) {
-                       return Status::newFatal( 'config-oracle-old', 
MW_MIN_ORACLE_VERSION, $version );
+               if ( version_compare( $version, $this->minimumVersion ) < 0 ) {
+                       return Status::newFatal( 'config-oracle-old', 
$this->minimumVersion, $version );
                }
 
                return $status;

Modified: trunk/phase3/includes/installer/WebInstallerOutput.php
===================================================================
--- trunk/phase3/includes/installer/WebInstallerOutput.php      2011-05-15 
13:20:34 UTC (rev 88175)
+++ trunk/phase3/includes/installer/WebInstallerOutput.php      2011-05-15 
13:21:16 UTC (rev 88176)
@@ -270,7 +270,8 @@
        }
 
        public function outputTitle() {
-               echo htmlspecialchars( wfMsg( 'config-title', MW_VERSION ) );
+               global $wgVersion;
+               echo htmlspecialchars( wfMsg( 'config-title', $wgVersion ) );
        }
 
        public function getJQuery() {

Modified: trunk/phase3/includes/resourceloader/ResourceLoaderStartUpModule.php
===================================================================
--- trunk/phase3/includes/resourceloader/ResourceLoaderStartUpModule.php        
2011-05-15 13:20:34 UTC (rev 88175)
+++ trunk/phase3/includes/resourceloader/ResourceLoaderStartUpModule.php        
2011-05-15 13:21:16 UTC (rev 88176)
@@ -35,7 +35,7 @@
        protected function getConfig( $context ) {
                global $wgLoadScript, $wgScript, $wgStylePath, 
$wgScriptExtension,
                        $wgArticlePath, $wgScriptPath, $wgServer, $wgContLang,
-                       $wgVariantArticlePath, $wgActionPaths, $wgUseAjax,
+                       $wgVariantArticlePath, $wgActionPaths, $wgUseAjax, 
$wgVersion, 
                        $wgEnableAPI, $wgEnableWriteAPI, $wgDBname, 
$wgEnableMWSuggest,
                        $wgSitename, $wgFileExtensions, $wgExtensionAssetsPath, 
$wgProto,
                        $wgCookiePrefix, $wgResourceLoaderMaxQueryLength, 
$wgLegacyJavaScriptGlobals;
@@ -71,7 +71,7 @@
                        'wgServer' => $wgServer,
                        'wgUserLanguage' => $context->getLanguage(),
                        'wgContentLanguage' => $wgContLang->getCode(),
-                       'wgVersion' => MW_VERSION,
+                       'wgVersion' => $wgVersion,
                        'wgEnableAPI' => $wgEnableAPI,
                        'wgEnableWriteAPI' => $wgEnableWriteAPI,
                        'wgDefaultDateFormat' => 
$wgContLang->getDefaultDateFormat(),

Modified: trunk/phase3/includes/specials/SpecialVersion.php
===================================================================
--- trunk/phase3/includes/specials/SpecialVersion.php   2011-05-15 13:20:34 UTC 
(rev 88175)
+++ trunk/phase3/includes/specials/SpecialVersion.php   2011-05-15 13:21:16 UTC 
(rev 88176)
@@ -159,16 +159,16 @@
         * @return mixed
         */
        public static function getVersion( $flags = '' ) {
-               global $IP;
+               global $wgVersion, $IP;
                wfProfileIn( __METHOD__ );
 
                $info = self::getSvnInfo( $IP );
                if ( !$info ) {
-                       $version = MW_VERSION;
+                       $version = $wgVersion;
                } elseif( $flags === 'nodb' ) {
-                       $version = MW_VERSION . " (r{$info['checkout-rev']})";
+                       $version = "$wgVersion (r{$info['checkout-rev']})";
                } else {
-                       $version = MW_VERSION . ' ' .
+                       $version = $wgVersion . ' ' .
                                wfMsg(
                                        'version-svn-revision',
                                        isset( $info['directory-rev'] ) ? 
$info['directory-rev'] : '',
@@ -187,13 +187,11 @@
         * @return mixed
         */
        public static function getVersionLinked() {
-               global $IP;
+               global $wgVersion, $IP;
                wfProfileIn( __METHOD__ );
 
                $info = self::getSvnInfo( $IP );
 
-               $version = MW_VERSION;
-
                if ( isset( $info['checkout-rev'] ) ) {
                        $linkText = wfMsg(
                                'version-svn-revision',
@@ -202,10 +200,12 @@
                        );
 
                        if ( isset( $info['viewvc-url'] ) ) {
-                               $version .= " [{$info['viewvc-url']} 
$linkText]";
+                               $version = "$wgVersion [{$info['viewvc-url']} 
$linkText]";
                        } else {
-                               $version .= " $linkText";
+                               $version = "$wgVersion $linkText";
                        }
+               } else {
+                       $version = $wgVersion;
                }
 
                wfProfileOut( __METHOD__ );
@@ -681,10 +681,9 @@
 
        function showEasterEgg() {
                $rx = $rp = $xe = '';
-               $version = MW_VERSION;
                $alpha = array("", "kbQW", "\$\n()");
                $beta = implode( "', '", $alpha);
-               $juliet = 'echo $delta + strrev($foxtrot) - $alfa + $version . 
base64_decode($bravo) * $charlie';
+               $juliet = 'echo $delta + strrev($foxtrot) - $alfa + $wgVersion 
. base64_decode($bravo) * $charlie';
                for ( $i = 1; $i <= 4; $i++ ) {
                        $rx .= '([^j]*)J';
                        $rp .= "+(\\$i)";

Modified: trunk/phase3/index.php
===================================================================
--- trunk/phase3/index.php      2011-05-15 13:20:34 UTC (rev 88175)
+++ trunk/phase3/index.php      2011-05-15 13:21:16 UTC (rev 88176)
@@ -36,18 +36,14 @@
  * @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>.
@@ -164,8 +160,11 @@
  * @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';

Modified: trunk/phase3/load.php
===================================================================
--- trunk/phase3/load.php       2011-05-15 13:20:34 UTC (rev 88175)
+++ trunk/phase3/load.php       2011-05-15 13:21:16 UTC (rev 88176)
@@ -30,14 +30,10 @@
        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." );
 }
 
 require ( dirname( __FILE__ ) . '/includes/WebStart.php' );

Modified: trunk/phase3/maintenance/Maintenance.php
===================================================================
--- trunk/phase3/maintenance/Maintenance.php    2011-05-15 13:20:34 UTC (rev 
88175)
+++ trunk/phase3/maintenance/Maintenance.php    2011-05-15 13:21:16 UTC (rev 
88176)
@@ -20,9 +20,6 @@
  * @defgroup Maintenance Maintenance
  */
 
-// Include global constants, including MW_VERSION and MW_MIN_PHP_VERSION
-require_once( dirname( dirname( __FILE__ ) ) . '/includes/Defines.php' );
-
 // Define this so scripts can easily find doMaintenance.php
 define( 'RUN_MAINTENANCE_IF_MAIN', dirname( __FILE__ ) . '/doMaintenance.php' 
);
 define( 'DO_MAINTENANCE', RUN_MAINTENANCE_IF_MAIN ); // original name, harmless
@@ -30,10 +27,10 @@
 $maintClass = false;
 
 // Make sure we're on PHP5 or better
-if ( version_compare( PHP_VERSION, MW_MIN_PHP_VERSION ) < 0 ) {
-       die ( "Sorry! This version of MediaWiki requires PHP " . 
MW_MIN_PHP_VERSION . "; you are running " .
+if ( version_compare( PHP_VERSION, '5.2.3' ) < 0 ) {
+       die ( "Sorry! This version of MediaWiki requires PHP 5.2.3; you are 
running " .
                PHP_VERSION . ".\n\n" .
-               "If you are sure you already have PHP " . MW_MIN_PHP_VERSION . 
" or higher installed, it may be\n" .
+               "If you are sure you already have PHP 5.2.3 or higher 
installed, it may be\n" .
                "installed in a different path from PHP " . PHP_VERSION . ". 
Check with your system\n" .
                "administrator.\n" );
 }

Modified: trunk/phase3/maintenance/install.php
===================================================================
--- trunk/phase3/maintenance/install.php        2011-05-15 13:20:34 UTC (rev 
88175)
+++ trunk/phase3/maintenance/install.php        2011-05-15 13:21:16 UTC (rev 
88176)
@@ -20,13 +20,9 @@
  * @see wfWaitForSlaves()
  */
 
-// Include global constants, including MW_VERSION and MW_MIN_PHP_VERSION
-require_once( dirname( dirname( __FILE__ ) ) . '/includes/Defines.php' );
-
-if ( !function_exists( 'version_compare' ) || ( version_compare( phpversion(), 
MW_MIN_PHP_VERSION ) < 0 ) ) {
-       echo "You are using PHP version " . phpversion() . " but MediaWiki 
needs PHP " .
-               MW_MIN_PHP_VERSION . " or higher. ABORTING.\n" .
-               "Check if you have a newer php executable with a different 
name, such as php5.\n";
+if ( !function_exists( 'version_compare' ) || ( version_compare( phpversion(), 
'5.2.3' ) < 0 ) ) {
+       echo "You are using PHP version " . phpversion() . " but MediaWiki 
needs PHP 5.2.3 or higher. ABORTING.\n" .
+       "Check if you have a newer php executable with a different name, such 
as php5.\n";
        die( 1 );
 }
 

Modified: trunk/phase3/maintenance/update.php
===================================================================
--- trunk/phase3/maintenance/update.php 2011-05-15 13:20:34 UTC (rev 88175)
+++ trunk/phase3/maintenance/update.php 2011-05-15 13:21:16 UTC (rev 88176)
@@ -25,12 +25,8 @@
  * @ingroup Maintenance
  */
 
-// Include global constants, including MW_VERSION and MW_MIN_PHP_VERSION
-require_once( dirname( dirname( __FILE__ ) ) . '/includes/Defines.php' );
-
-if ( !function_exists( 'version_compare' ) || ( version_compare( phpversion(), 
MW_MIN_PHP_VERSION ) < 0 ) ) {
-       echo "You are using PHP version " . phpversion() . " but MediaWiki 
needs PHP " .
-               MW_MIN_PHP_VERSION . "or higher. ABORTING.\n" .
+if ( !function_exists( 'version_compare' ) || ( version_compare( phpversion(), 
'5.2.3' ) < 0 ) ) {
+       echo "You are using PHP version " . phpversion() . " but MediaWiki 
needs PHP 5.2.3 or higher. ABORTING.\n" .
        "Check if you have a newer php executable with a different name, such 
as php5.\n";
        die( 1 );
 }

Modified: trunk/phase3/tests/parserTests.php
===================================================================
--- trunk/phase3/tests/parserTests.php  2011-05-15 13:20:34 UTC (rev 88175)
+++ trunk/phase3/tests/parserTests.php  2011-05-15 13:21:16 UTC (rev 88176)
@@ -30,9 +30,8 @@
 require_once( dirname( __FILE__ ) . '/../maintenance/commandLine.inc' );
 
 if ( isset( $options['help'] ) ) {
-       $version = MW_VERSION;
        echo <<<ENDS
-MediaWiki $version parser test suite
+MediaWiki $wgVersion parser test suite
 Usage: php parserTests.php [options...]
 
 Options:


_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to