* use call_user_func instead of $class::isCompiled() for php 5.2 (re r69128)
authorMark A. Hershberger <mah@users.mediawiki.org>
Wed, 7 Jul 2010 13:39:57 +0000 (13:39 +0000)
committerMark A. Hershberger <mah@users.mediawiki.org>
Wed, 7 Jul 2010 13:39:57 +0000 (13:39 +0000)
* in performInstallation, $step is always a string, check $stepObj instead
* remove installUser() method that only called setupUser, which only MySQL needs and is added by modifying the steps

includes/installer/Installer.php

index 5efdc0c..7c44ddb 100644 (file)
@@ -282,7 +282,7 @@ abstract class Installer {
 
                if ( !isset( $this->dbInstallers[$type] ) ) {
                        $class = ucfirst( $type ). 'Installer';
-                       if ($class::isCompiled()) {
+                       if ( call_user_func( array( $class, 'isCompiled' ) ) ) {
                                $this->dbInstallers[$type] = new $class( $this );
                        } else {
                                $this->dbInstallers[$type] = false;
@@ -873,7 +873,7 @@ abstract class Installer {
                        $status = null;
 
                        # Call our working function
-                       if ( is_array( $step ) ) {
+                       if ( is_array( $stepObj ) ) {
                                # A custom callaback
                                $callback = $stepObj['callback'];
                                $status = call_user_func_array( $callback, array() );
@@ -914,12 +914,6 @@ abstract class Installer {
                return $status;
        }
 
-       public function installUser() {
-               $installer = $this->getDBInstaller( $this->getVar( 'wgDBtype' ) );
-               $status = $installer->setupUser();
-               return $status;
-       }
-
        public function installTables() {
                $installer = $this->getDBInstaller();
                $status = $installer->createTables();