From d9022f63880ce039446fba8364f68e656b7bf4cb Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Thu, 3 May 2012 13:01:35 +0200 Subject: Update to MediaWiki 1.19.0 --- includes/installer/DatabaseInstaller.php | 33 ++++++++++++++++++++++++++++---- 1 file changed, 29 insertions(+), 4 deletions(-) (limited to 'includes/installer/DatabaseInstaller.php') diff --git a/includes/installer/DatabaseInstaller.php b/includes/installer/DatabaseInstaller.php index aadd6b49..ab77e2d3 100644 --- a/includes/installer/DatabaseInstaller.php +++ b/includes/installer/DatabaseInstaller.php @@ -54,6 +54,15 @@ abstract class DatabaseInstaller { */ public abstract function isCompiled(); + /** + * Checks for installation prerequisites other than those checked by isCompiled() + * @since 1.19 + * @return Status + */ + public function checkPrerequisites() { + return Status::newGood(); + } + /** * Get HTML for a web form that configures this database. Configuration * at this time should be the minimum needed to connect and test @@ -148,7 +157,7 @@ abstract class DatabaseInstaller { } $this->db->selectDB( $this->getVar( 'wgDBname' ) ); - if( $this->db->tableExists( 'user' ) ) { + if( $this->db->tableExists( 'archive', __METHOD__ ) ) { $status->warning( 'config-install-tables-exist' ); $this->enableLB(); return $status; @@ -281,6 +290,7 @@ abstract class DatabaseInstaller { /** * Construct and initialise parent. * This is typically only called from Installer::getDBInstaller() + * @param $parent */ public function __construct( $parent ) { $this->parent = $parent; @@ -291,6 +301,8 @@ abstract class DatabaseInstaller { * Check if a named extension is present. * * @see wfDl + * @param $name + * @return bool */ protected static function checkExtension( $name ) { wfSuppressWarnings(); @@ -323,6 +335,9 @@ abstract class DatabaseInstaller { /** * Get a variable, taking local defaults into account. + * @param $var string + * @param $default null + * @return mixed */ public function getVar( $var, $default = null ) { $defaults = $this->getGlobalDefaults(); @@ -337,6 +352,8 @@ abstract class DatabaseInstaller { /** * Convenience alias for $this->parent->setVar() + * @param $name string + * @param $value mixed */ public function setVar( $name, $value ) { $this->parent->setVar( $name, $value ); @@ -345,6 +362,10 @@ abstract class DatabaseInstaller { /** * Get a labelled text box to configure a local variable. * + * @param $var string + * @param $label string + * @param $attribs array + * @param $helpData string * @return string */ public function getTextBox( $var, $label, $attribs = array(), $helpData = "" ) { @@ -367,6 +388,10 @@ abstract class DatabaseInstaller { * Get a labelled password box to configure a local variable. * Implements password hiding. * + * @param $var string + * @param $label string + * @param $attribs array + * @param $helpData string * @return string */ public function getPasswordBox( $var, $label, $attribs = array(), $helpData = "" ) { @@ -450,7 +475,7 @@ abstract class DatabaseInstaller { if ( !$this->db->selectDB( $this->getVar( 'wgDBname' ) ) ) { return false; } - return $this->db->tableExists( 'cur' ) || $this->db->tableExists( 'revision' ); + return $this->db->tableExists( 'cur', __METHOD__ ) || $this->db->tableExists( 'revision', __METHOD__ ); } /** @@ -462,8 +487,8 @@ abstract class DatabaseInstaller { return Html::openElement( 'fieldset' ) . Html::element( 'legend', array(), wfMsg( 'config-db-install-account' ) ) . - $this->getTextBox( '_InstallUser', 'config-db-username', array(), $this->parent->getHelpBox( 'config-db-install-username' ) ) . - $this->getPasswordBox( '_InstallPassword', 'config-db-password', array(), $this->parent->getHelpBox( 'config-db-install-password' ) ) . + $this->getTextBox( '_InstallUser', 'config-db-username', array( 'dir' => 'ltr' ), $this->parent->getHelpBox( 'config-db-install-username' ) ) . + $this->getPasswordBox( '_InstallPassword', 'config-db-password', array( 'dir' => 'ltr' ), $this->parent->getHelpBox( 'config-db-install-password' ) ) . Html::closeElement( 'fieldset' ); } -- cgit v1.2.3-54-g00ecf