Replace XML->HTML methods throughout most of the installer
authorChad Horohoe <demon@users.mediawiki.org>
Thu, 4 Nov 2010 23:21:24 +0000 (23:21 +0000)
committerChad Horohoe <demon@users.mediawiki.org>
Thu, 4 Nov 2010 23:21:24 +0000 (23:21 +0000)
includes/installer/DatabaseInstaller.php
includes/installer/MysqlInstaller.php
includes/installer/OracleInstaller.php
includes/installer/PostgresInstaller.php
includes/installer/WebInstallerPage.php

index dc6b9fd..d05b450 100644 (file)
@@ -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;
        }
 
index 362810b..7a6e4fd 100644 (file)
@@ -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();
        }
 
index 2444f90..62b3ad2 100644 (file)
@@ -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() {
index a63208a..665099f 100644 (file)
@@ -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();
        }
 
index 3e1d685..f091186 100644 (file)
@@ -39,7 +39,7 @@ abstract class WebInstallerPage {
        public function startForm() {
                $this->addHTML(
                        "<div class=\"config-section\">\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 {
                                "</li>\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() .
                                "</div>\n";
                }
@@ -802,7 +802,7 @@ class WebInstaller_Options extends WebInstallerPage {
 
                return
                        "<div class=\"config-cc-wrapper\" id=\"config-cc-wrapper\" style=\"display: none;\">\n" .
-                       Xml::element( 'iframe', $iframeAttribs, '', false /* not short */ ) .
+                       Html::element( 'iframe', $iframeAttribs, '', false /* not short */ ) .
                        "</div>\n";
        }
 
@@ -813,12 +813,12 @@ class WebInstaller_Options extends WebInstallerPage {
                $reduceJs = str_replace( '$1', '70px', $js );
                return
                        '<p>'.
-                       Xml::element( 'img', array( 'src' => $this->getVar( 'wgRightsIcon' ) ) ) .
+                       Html::element( 'img', array( 'src' => $this->getVar( 'wgRightsIcon' ) ) ) .
                        '&#160;&#160;' .
                        htmlspecialchars( $this->getVar( 'wgRightsText' ) ) .
                        "</p>\n" .
                        "<p style=\"text-align: center\">" .
-                       Xml::element( 'a',
+                       Html::element( 'a',
                                array(
                                        'href' => $this->getCCPartnerUrl(),
                                        'onclick' => $expandJs,