From 0bee9581b413639185e9e877bf572c4700d44d96 Mon Sep 17 00:00:00 2001 From: Chad Horohoe Date: Thu, 4 Nov 2010 23:21:24 +0000 Subject: [PATCH] Replace XML->HTML methods throughout most of the installer --- includes/installer/DatabaseInstaller.php | 12 ++++++------ includes/installer/MysqlInstaller.php | 6 +++--- includes/installer/OracleInstaller.php | 8 ++++---- includes/installer/PostgresInstaller.php | 6 +++--- includes/installer/WebInstallerPage.php | 14 +++++++------- 5 files changed, 23 insertions(+), 23 deletions(-) diff --git a/includes/installer/DatabaseInstaller.php b/includes/installer/DatabaseInstaller.php index dc6b9fd704..d05b450509 100644 --- a/includes/installer/DatabaseInstaller.php +++ b/includes/installer/DatabaseInstaller.php @@ -373,11 +373,11 @@ abstract class DatabaseInstaller { */ public function getInstallUserBox() { return - Xml::openElement( 'fieldset' ) . - Xml::element( 'legend', array(), wfMsg( 'config-db-install-account' ) ) . + 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' ) ) . - Xml::closeElement( 'fieldset' ); + Html::closeElement( 'fieldset' ); } /** @@ -396,12 +396,12 @@ abstract class DatabaseInstaller { public function getWebUserBox( $noCreateMsg = false ) { $name = $this->getName(); $s = Xml::openElement( 'fieldset' ) . - Xml::element( 'legend', array(), wfMsg( 'config-db-web-account' ) ) . + Html::element( 'legend', array(), wfMsg( 'config-db-web-account' ) ) . $this->getCheckBox( '_SameAccount', 'config-db-web-account-same', array( 'class' => 'hideShowRadio', 'rel' => 'dbOtherAccount' ) ) . - Xml::openElement( 'div', array( 'id' => 'dbOtherAccount', 'style' => 'display: none;' ) ) . + Html::openElement( 'div', array( 'id' => 'dbOtherAccount', 'style' => 'display: none;' ) ) . $this->getTextBox( 'wgDBuser', 'config-db-username' ) . $this->getPasswordBox( 'wgDBpassword', 'config-db-password' ) . $this->parent->getHelpBox( 'config-db-web-help' ); @@ -410,7 +410,7 @@ abstract class DatabaseInstaller { } else { $s .= $this->getCheckBox( '_CreateDBAccount', 'config-db-web-create' ); } - $s .= Xml::closeElement( 'div' ) . Xml::closeElement( 'fieldset' ); + $s .= Html::closeElement( 'div' ) . Html::closeElement( 'fieldset' ); return $s; } diff --git a/includes/installer/MysqlInstaller.php b/includes/installer/MysqlInstaller.php index 362810b93b..7a6e4fd73d 100644 --- a/includes/installer/MysqlInstaller.php +++ b/includes/installer/MysqlInstaller.php @@ -60,11 +60,11 @@ class MysqlInstaller extends DatabaseInstaller { public function getConnectForm() { return $this->getTextBox( 'wgDBserver', 'config-db-host', array(), $this->parent->getHelpBox( 'config-db-host-help' ) ) . - Xml::openElement( 'fieldset' ) . - Xml::element( 'legend', array(), wfMsg( 'config-db-wiki-settings' ) ) . + Html::openElement( 'fieldset' ) . + Html::element( 'legend', array(), wfMsg( 'config-db-wiki-settings' ) ) . $this->getTextBox( 'wgDBname', 'config-db-name', array(), $this->parent->getHelpBox( 'config-db-name-help' ) ) . $this->getTextBox( 'wgDBprefix', 'config-db-prefix', array(), $this->parent->getHelpBox( 'config-db-prefix-help' ) ) . - Xml::closeElement( 'fieldset' ) . + Html::closeElement( 'fieldset' ) . $this->getInstallUserBox(); } diff --git a/includes/installer/OracleInstaller.php b/includes/installer/OracleInstaller.php index 2444f909ce..62b3ad2cbd 100644 --- a/includes/installer/OracleInstaller.php +++ b/includes/installer/OracleInstaller.php @@ -43,13 +43,13 @@ class OracleInstaller extends DatabaseInstaller { $this->parent->setVar( '_SameAccount', false ); $this->parent->setVar( '_CreateDBAccount', true ); $this->parent->setVar( 'wgDBname', '' ); - return Xml::openElement( 'fieldset' ) . - Xml::element( 'legend', array(), wfMsg( 'config-db-web-account' ) ) . - Xml::openElement( 'div', array( 'id' => 'dbOtherAccount' ) ) . + return Html::openElement( 'fieldset' ) . + Html::element( 'legend', array(), wfMsg( 'config-db-web-account' ) ) . + Html::openElement( 'div', array( 'id' => 'dbOtherAccount' ) ) . $this->getTextBox( 'wgDBuser', 'config-db-username' ) . $this->getPasswordBox( 'wgDBpassword', 'config-db-password', array(), $this->parent->getHelpBox( 'config-db-web-help' ) ) . $this->getCheckBox( '_CreateDBAccount', 'config-db-web-create', array( 'disabled' => true ) ). - Xml::closeElement( 'div' ) . Xml::closeElement( 'fieldset' ); + Html::closeElement( 'div' ) . Html::closeElement( 'fieldset' ); } public function getConnectForm() { diff --git a/includes/installer/PostgresInstaller.php b/includes/installer/PostgresInstaller.php index a63208a590..665099f3cb 100644 --- a/includes/installer/PostgresInstaller.php +++ b/includes/installer/PostgresInstaller.php @@ -38,12 +38,12 @@ class PostgresInstaller extends DatabaseInstaller { return $this->getTextBox( 'wgDBserver', 'config-db-host', array(), $this->parent->getHelpBox( 'config-db-host-help' ) ) . $this->getTextBox( 'wgDBport', 'config-db-port' ) . - Xml::openElement( 'fieldset' ) . - Xml::element( 'legend', array(), wfMsg( 'config-db-wiki-settings' ) ) . + Html::openElement( 'fieldset' ) . + Html::element( 'legend', array(), wfMsg( 'config-db-wiki-settings' ) ) . $this->getTextBox( 'wgDBname', 'config-db-name', array(), $this->parent->getHelpBox( 'config-db-name-help' ) ) . $this->getTextBox( 'wgDBmwschema', 'config-db-schema', array(), $this->parent->getHelpBox( 'config-db-schema-help' ) ) . $this->getTextBox( 'wgDBts2schema', 'config-db-ts2-schema' ) . - Xml::closeElement( 'fieldset' ) . + Html::closeElement( 'fieldset' ) . $this->getInstallUserBox(); } diff --git a/includes/installer/WebInstallerPage.php b/includes/installer/WebInstallerPage.php index 3e1d685c4e..f091186825 100644 --- a/includes/installer/WebInstallerPage.php +++ b/includes/installer/WebInstallerPage.php @@ -39,7 +39,7 @@ abstract class WebInstallerPage { public function startForm() { $this->addHTML( "
\n" . - Xml::openElement( + Html::openElement( 'form', array( 'method' => 'post', @@ -235,7 +235,7 @@ class WebInstaller_Language extends WebInstallerPage { */ public function getLanguageSelector( $name, $label, $selectedCode ) { global $wgDummyLanguageCodes; - $s = Xml::openElement( 'select', array( 'id' => $name, 'name' => $name ) ) . "\n"; + $s = Html::openElement( 'select', array( 'id' => $name, 'name' => $name ) ) . "\n"; $languages = Language::getLanguageNames(); ksort( $languages ); @@ -314,8 +314,8 @@ class WebInstaller_DBConnect extends WebInstallerPage { "\n"; $settings .= - Xml::openElement( 'div', array( 'id' => 'DB_wrapper_' . $type, 'class' => 'dbWrapper' ) ) . - Xml::element( 'h3', array(), wfMsg( 'config-header-' . $type ) ) . + Html::openElement( 'div', array( 'id' => 'DB_wrapper_' . $type, 'class' => 'dbWrapper' ) ) . + Html::element( 'h3', array(), wfMsg( 'config-header-' . $type ) ) . $installer->getConnectForm() . "
\n"; } @@ -802,7 +802,7 @@ class WebInstaller_Options extends WebInstallerPage { return "
\n" . - Xml::element( 'iframe', $iframeAttribs, '', false /* not short */ ) . + Html::element( 'iframe', $iframeAttribs, '', false /* not short */ ) . "
\n"; } @@ -813,12 +813,12 @@ class WebInstaller_Options extends WebInstallerPage { $reduceJs = str_replace( '$1', '70px', $js ); return '

'. - Xml::element( 'img', array( 'src' => $this->getVar( 'wgRightsIcon' ) ) ) . + Html::element( 'img', array( 'src' => $this->getVar( 'wgRightsIcon' ) ) ) . '  ' . htmlspecialchars( $this->getVar( 'wgRightsText' ) ) . "

\n" . "

" . - Xml::element( 'a', + Html::element( 'a', array( 'href' => $this->getCCPartnerUrl(), 'onclick' => $expandJs, -- 2.20.1