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

Revision: 74167
Author:   siebrand
Date:     2010-10-02 22:22:12 +0000 (Sat, 02 Oct 2010)

Log Message:
-----------
Remove some references to no longer supported PHP version.

Also add a FIXME for a check in DefaultSettings.php and fix indentation in 
install-utils.inc.

Modified Paths:
--------------
    trunk/phase3/includes/Article.php
    trunk/phase3/includes/DefaultSettings.php
    trunk/phase3/includes/GlobalFunctions.php
    trunk/phase3/includes/WebStart.php
    trunk/phase3/includes/templates/PHP4.php
    trunk/phase3/maintenance/Maintenance.php
    trunk/phase3/maintenance/install-utils.inc
    trunk/phase3/php5.php5

Modified: trunk/phase3/includes/Article.php
===================================================================
--- trunk/phase3/includes/Article.php   2010-10-02 22:21:15 UTC (rev 74166)
+++ trunk/phase3/includes/Article.php   2010-10-02 22:22:12 UTC (rev 74167)
@@ -4492,7 +4492,6 @@
                }
 
                # 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 ) {

Modified: trunk/phase3/includes/DefaultSettings.php
===================================================================
--- trunk/phase3/includes/DefaultSettings.php   2010-10-02 22:21:15 UTC (rev 
74166)
+++ trunk/phase3/includes/DefaultSettings.php   2010-10-02 22:22:12 UTC (rev 
74167)
@@ -3778,6 +3778,8 @@
 /**
  * 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

Modified: trunk/phase3/includes/GlobalFunctions.php
===================================================================
--- trunk/phase3/includes/GlobalFunctions.php   2010-10-02 22:21:15 UTC (rev 
74166)
+++ trunk/phase3/includes/GlobalFunctions.php   2010-10-02 22:22:12 UTC (rev 
74167)
@@ -16,7 +16,7 @@
 /**
  * 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.
  */

Modified: trunk/phase3/includes/WebStart.php
===================================================================
--- trunk/phase3/includes/WebStart.php  2010-10-02 22:21:15 UTC (rev 74166)
+++ trunk/phase3/includes/WebStart.php  2010-10-02 22:22:12 UTC (rev 74167)
@@ -89,16 +89,6 @@
        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" );
 

Modified: trunk/phase3/includes/templates/PHP4.php
===================================================================
--- trunk/phase3/includes/templates/PHP4.php    2010-10-02 22:21:15 UTC (rev 
74166)
+++ trunk/phase3/includes/templates/PHP4.php    2010-10-02 22:22:12 UTC (rev 
74167)
@@ -58,7 +58,7 @@
                <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

Modified: trunk/phase3/maintenance/Maintenance.php
===================================================================
--- trunk/phase3/maintenance/Maintenance.php    2010-10-02 22:21:15 UTC (rev 
74166)
+++ trunk/phase3/maintenance/Maintenance.php    2010-10-02 22:22:12 UTC (rev 
74167)
@@ -15,11 +15,12 @@
 }
 
 // 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" );
 }
 
 /**

Modified: trunk/phase3/maintenance/install-utils.inc
===================================================================
--- trunk/phase3/maintenance/install-utils.inc  2010-10-02 22:21:15 UTC (rev 
74166)
+++ trunk/phase3/maintenance/install-utils.inc  2010-10-02 22:22:12 UTC (rev 
74167)
@@ -19,8 +19,8 @@
        }
        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 );
        }
 

Modified: trunk/phase3/php5.php5
===================================================================
--- trunk/phase3/php5.php5      2010-10-02 22:21:15 UTC (rev 74166)
+++ trunk/phase3/php5.php5      2010-10-02 22:22:12 UTC (rev 74167)
@@ -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';
 }



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

Reply via email to