r69141 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r69140‎ | r69141 | r69142 >
Date:13:39, 7 July 2010
Author:mah
Status:ok (Comments)
Tags:
Comment:
* use call_user_func instead of $class::isCompiled() for php 5.2 (re r69128)
* 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
Modified paths:
  • /trunk/phase3/includes/installer/Installer.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/installer/Installer.php
@@ -282,7 +282,7 @@
283283
284284 if ( !isset( $this->dbInstallers[$type] ) ) {
285285 $class = ucfirst( $type ). 'Installer';
286 - if ($class::isCompiled()) {
 286+ if ( call_user_func( array( $class, 'isCompiled' ) ) ) {
287287 $this->dbInstallers[$type] = new $class( $this );
288288 } else {
289289 $this->dbInstallers[$type] = false;
@@ -873,7 +873,7 @@
874874 $status = null;
875875
876876 # Call our working function
877 - if ( is_array( $step ) ) {
 877+ if ( is_array( $stepObj ) ) {
878878 # A custom callaback
879879 $callback = $stepObj['callback'];
880880 $status = call_user_func_array( $callback, array() );
@@ -914,12 +914,6 @@
915915 return $status;
916916 }
917917
918 - public function installUser() {
919 - $installer = $this->getDBInstaller( $this->getVar( 'wgDBtype' ) );
920 - $status = $installer->setupUser();
921 - return $status;
922 - }
923 -
924918 public function installTables() {
925919 $installer = $this->getDBInstaller();
926920 $status = $installer->createTables();

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r69128* Add Status::getWarningsArray() to complement Status::getErrorsArray()...mah02:53, 7 July 2010

Comments

#Comment by 😂 (talk | contribs)   18:16, 9 July 2010

The isCompiled() stuff was reverted back to being non-static. The rest of this is ok.

Status & tagging log