* Drop 5.1 compat code
authorAlexandre Emsenhuber <ialex@users.mediawiki.org>
Sun, 3 Apr 2011 09:44:50 +0000 (09:44 +0000)
committerAlexandre Emsenhuber <ialex@users.mediawiki.org>
Sun, 3 Apr 2011 09:44:50 +0000 (09:44 +0000)
* Fix one more PHP version requirement

includes/AutoLoader.php
includes/GlobalFunctions.php
includes/Hooks.php

index 7e4ecf1..2d690df 100644 (file)
@@ -835,12 +835,4 @@ class AutoLoader {
        }
 }
 
-if ( function_exists( 'spl_autoload_register' ) ) {
-       spl_autoload_register( array( 'AutoLoader', 'autoload' ) );
-} else {
-       function __autoload( $class ) {
-               AutoLoader::autoload( $class );
-       }
-
-       ini_set( 'unserialize_callback_func', '__autoload' );
-}
+spl_autoload_register( array( 'AutoLoader', 'autoload' ) );
index 9cdce49..9dbbe54 100644 (file)
@@ -16,7 +16,7 @@ require_once dirname( __FILE__ ) . '/normal/UtfNormalUtil.php';
 /**
  * Compatibility functions
  *
- * We support PHP 5.1.x and up.
+ * We support PHP 5.2.3 and up.
  * Re-implementations of newer functions or functions in non-standard
  * PHP extensions may be included here.
  */
index 87c677d..3f05268 100644 (file)
@@ -203,8 +203,6 @@ class Hooks {
                        } elseif ( isset( $object ) ) {
                                $func = get_class( $object ) . '::' . $method;
                                $callback = array( $object, $method );
-                       } elseif ( false !== ( $pos = strpos( $func, '::' ) ) ) {
-                               $callback = array( substr( $func, 0, $pos ), substr( $func, $pos + 2 ) );
                        } else {
                                $callback = $func;
                        }