Remove some references to no longer supported PHP version.
authorSiebrand Mazeland <siebrand@users.mediawiki.org>
Sat, 2 Oct 2010 22:22:12 +0000 (22:22 +0000)
committerSiebrand Mazeland <siebrand@users.mediawiki.org>
Sat, 2 Oct 2010 22:22:12 +0000 (22:22 +0000)
Also add a FIXME for a check in DefaultSettings.php and fix indentation in install-utils.inc.

includes/Article.php
includes/DefaultSettings.php
includes/GlobalFunctions.php
includes/WebStart.php
includes/templates/PHP4.php
maintenance/Maintenance.php
maintenance/install-utils.inc
php5.php5

index 0fe0dc9..211a0da 100644 (file)
@@ -4492,7 +4492,6 @@ class Article {
                }
 
                # Get the diff
-               # Note that we simulate array_diff_key in PHP <5.0.x
                $templates_diff = array_diff_key( $poTemplates, $tlTemplates );
 
                if ( count( $templates_diff ) > 0 ) {
index 07f8025..7b143e4 100644 (file)
@@ -3778,6 +3778,8 @@ $wgAdvancedSearchHighlighting = false;
 /**
  * Regexp to match word boundaries, defaults for non-CJK languages
  * should be empty for CJK since the words are not separate
+ *
+ * @todo FIXME: checks for lower than required PHP version (5.1.x).
  */
 $wgSearchHighlightBoundaries = version_compare("5.1", PHP_VERSION, "<")? '[\p{Z}\p{P}\p{C}]'
        : '[ ,.;:!?~!@#$%\^&*\(\)+=\-\\|\[\]"\'<>\n\r\/{}]'; // PHP 5.0 workaround
index 0e00c69..fc793b9 100644 (file)
@@ -16,7 +16,7 @@ require_once dirname( __FILE__ ) . '/normal/UtfNormalUtil.php';
 /**
  * Compatibility functions
  *
- * We more or less support PHP 5.0.x and up.
+ * We support PHP 5.1.x and up.
  * Re-implementations of newer functions or functions in non-standard
  * PHP extensions may be included here.
  */
index 13dc08c..557fa74 100644 (file)
@@ -89,16 +89,6 @@ if ( !function_exists( 'version_compare' )
        exit;
 }
 
-# Test for PHP bug which breaks PHP 5.0.x on 64-bit...
-# As of 1.8 this breaks lots of common operations instead
-# of just some rare ones like export.
-$borked = str_replace( 'a', 'b', array( -1 => -1 ) );
-if( !isset( $borked[-1] ) ) {
-       echo "PHP 5.0.x is buggy on your 64-bit system; you must upgrade to PHP 5.1.x\n" .
-            "or higher. ABORTING. (http://bugs.php.net/bug.php?id=34879 for details)\n";
-       exit;
-}
-
 # Start the autoloader, so that extensions can derive classes from core files
 require_once( "$IP/includes/AutoLoader.php" );
 
index ea562aa..511ce71 100644 (file)
@@ -58,7 +58,7 @@ if ( preg_match( '!^(.*)/config/[^/]*.php$!', $scriptUrl, $m ) ) {
                <h1>MediaWiki <?php echo htmlspecialchars( $wgVersion ); ?></h1>
                <div class='error'>
 <p>
-                       MediaWiki requires PHP 5.0.0 or higher. You are running PHP
+                       MediaWiki requires PHP 5.1.x or higher. You are running PHP
                        <?php echo htmlspecialchars( phpversion() ); ?>.
 </p>
 <?php
index bf0639b..84c1535 100644 (file)
@@ -15,11 +15,12 @@ function wfRunMaintenance( $class ) {
 }
 
 // Make sure we're on PHP5 or better
-if ( version_compare( PHP_VERSION, '5.0.0' ) < 0 ) {
-       die ( "Sorry! This version of MediaWiki requires PHP 5; you are running " .
+if ( version_compare( PHP_VERSION, '5.1.0' ) < 0 ) {
+       die ( "Sorry! This version of MediaWiki requires PHP 5.1.x; you are running " .
                PHP_VERSION . ".\n\n" .
-               "If you are sure you already have PHP 5 installed, it may be installed\n" .
-               "in a different path from PHP 4. Check with your system administrator.\n" );
+               "If you are sure you already have PHP 5.1.x or higher installed, it may be\n" .
+               "installed in a different path from PHP " . PHP_VERSION . ". Check with your system\n" .
+               "administrator.\n" );
 }
 
 /**
index e37aeb9..c2c253e 100644 (file)
@@ -19,8 +19,8 @@ function install_version_checks() {
        }
        if ( version_compare( phpversion(), '5.1.0' ) < 0 ) {
                echo "PHP 5.1.0 or higher is required. If PHP 5 is available only when \n" .
-   "PHP files have a .php5 extension, please navigate to <a href=\"index.php5\">index.php5</a> \n" .
-   "to continue installation. ABORTING.\n";
+               "PHP files have a .php5 extension, please navigate to <a href=\"index.php5\">index.php5</a> \n" .
+               "to continue installation. ABORTING.\n";
                die( 1 );
        }
 
index 44f5113..51e077f 100644 (file)
--- a/php5.php5
+++ b/php5.php5
@@ -4,6 +4,6 @@
  * Test for *.php5 capability in webserver
  * Used by includes/templates/PHP4.php
  */
-if ( version_compare( phpversion(), '5.0.0' ) >= 0 ) {
+if ( version_compare( phpversion(), '5.1.0' ) >= 0 ) {
        echo 'y'.'e'.'s';
 }