* Fix r74790 by actually calling setup (using parent::setup)
[lhc/web/wiklou.git] / config / Installer.php
index 20526a1..e2d0134 100644 (file)
@@ -277,9 +277,6 @@ if( !is_writable( "." ) ) {
        <p>Afterwards retry to start the <a href=\"\">setup</a>.</p>" );
 }
 
-
-require_once( "$IP/maintenance/updaters.inc" );
-
 class ConfigData {
        function getEncoded( $data ) {
                # removing latin1 support, no need...
@@ -1042,7 +1039,7 @@ if( $conf->posted && ( 0 == count( $errs ) ) ) {
                                echo "<li>Connect failed.</li>";
                                if ($useRoot) {
                                        if (ini_get('oci8.privileged_connect') === false) {
-                                               echo "<li>Privileged connect disabled, please set oci8.privileged_connect or run maintenance/ora/user.sql script manually prior to continuing.</li>";
+                                               echo "<li>Privileged connect disabled, please set oci8.privileged_connect or run maintenance/oracle/user.sql script manually prior to continuing.</li>";
                                                $ok = false;
                                        } else {
                                                $wgDBadminuser = $conf->RootUser;
@@ -1052,7 +1049,7 @@ if( $conf->posted && ( 0 == count( $errs ) ) ) {
                                                if ($wgDatabase->isOpen()) {
                                                        $wgDBOracleDefTS = $conf->DBdefTS_ora;
                                                        $wgDBOracleTempTS = $conf->DBtempTS_ora;
-                                                       $res = $wgDatabase->sourceFile( "../maintenance/ora/user.sql"  );
+                                                       $res = $wgDatabase->sourceFile( "../maintenance/oracle/user.sql"  );
                                                        if ($res !== true) dieout($res);
                                                } else {
                                                        echo "<li>Invalid database superuser, please supply a valid superuser account.</li>";
@@ -1236,7 +1233,13 @@ if( $conf->posted && ( 0 == count( $errs ) ) ) {
                        print "</ul><pre>\n";
                        chdir( ".." );
                        flush();
-                       do_all_updates();
+
+                       $updater = DatabaseUpdater::newForDb( $wgDatabase, false );
+                       $updater->doUpdates();
+                       foreach( $updater->getPostDatabaseUpdateMaintenance() as $maint ) {
+                               call_user_func_array( array( new $maint, 'execute' ), array() );
+                       }
+
                        chdir( "config" );
                        print "</pre>\n";
                        print "<ul><li>Finished update checks.</li>\n";
@@ -1246,7 +1249,7 @@ if( $conf->posted && ( 0 == count( $errs ) ) ) {
                        if ( $conf->DBtype == 'mysql' && version_compare( $myver, "4.1.2", "ge" ) ) {
                                $res = $wgDatabase->query( 'SHOW ENGINES' );
                                $found = false;
-                               while ( $row = $wgDatabase->fetchObject( $res ) ) {
+                               foreach ( $res as $row ) {
                                        if ( $row->Engine == $conf->DBengine && ( $row->Support == 'YES' || $row->Support == 'DEFAULT' ) ) {
                                                $found = true;
                                                break;
@@ -2103,8 +2106,9 @@ function aField( &$conf, $field, $text, $type = "text", $value = "", $onclick =
        $id = $field;
        $nolabel = ($type == "radio") || ($type == "hidden");
 
-       if ($type == 'radio')
+       if ($type == 'radio') {
                $id .= $radioCount++;
+       }
 
        if( !$nolabel ) {
                echo "<label class='column' for=\"$id\">$text</label>";