r76055 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r76054‎ | r76055 | r76056 >
Date:23:21, 4 November 2010
Author:demon
Status:ok
Tags:
Comment:
Replace XML->HTML methods throughout most of the installer
Modified paths:
  • /trunk/phase3/includes/installer/DatabaseInstaller.php (modified) (history)
  • /trunk/phase3/includes/installer/MysqlInstaller.php (modified) (history)
  • /trunk/phase3/includes/installer/OracleInstaller.php (modified) (history)
  • /trunk/phase3/includes/installer/PostgresInstaller.php (modified) (history)
  • /trunk/phase3/includes/installer/WebInstallerPage.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/installer/DatabaseInstaller.php
@@ -373,11 +373,11 @@
374374 */
375375 public function getInstallUserBox() {
376376 return
377 - Xml::openElement( 'fieldset' ) .
378 - Xml::element( 'legend', array(), wfMsg( 'config-db-install-account' ) ) .
 377+ Html::openElement( 'fieldset' ) .
 378+ Html::element( 'legend', array(), wfMsg( 'config-db-install-account' ) ) .
379379 $this->getTextBox( '_InstallUser', 'config-db-username', array(), $this->parent->getHelpBox( 'config-db-install-username' ) ) .
380380 $this->getPasswordBox( '_InstallPassword', 'config-db-password', array(), $this->parent->getHelpBox( 'config-db-install-password' ) ) .
381 - Xml::closeElement( 'fieldset' );
 381+ Html::closeElement( 'fieldset' );
382382 }
383383
384384 /**
@@ -396,12 +396,12 @@
397397 public function getWebUserBox( $noCreateMsg = false ) {
398398 $name = $this->getName();
399399 $s = Xml::openElement( 'fieldset' ) .
400 - Xml::element( 'legend', array(), wfMsg( 'config-db-web-account' ) ) .
 400+ Html::element( 'legend', array(), wfMsg( 'config-db-web-account' ) ) .
401401 $this->getCheckBox(
402402 '_SameAccount', 'config-db-web-account-same',
403403 array( 'class' => 'hideShowRadio', 'rel' => 'dbOtherAccount' )
404404 ) .
405 - Xml::openElement( 'div', array( 'id' => 'dbOtherAccount', 'style' => 'display: none;' ) ) .
 405+ Html::openElement( 'div', array( 'id' => 'dbOtherAccount', 'style' => 'display: none;' ) ) .
406406 $this->getTextBox( 'wgDBuser', 'config-db-username' ) .
407407 $this->getPasswordBox( 'wgDBpassword', 'config-db-password' ) .
408408 $this->parent->getHelpBox( 'config-db-web-help' );
@@ -410,7 +410,7 @@
411411 } else {
412412 $s .= $this->getCheckBox( '_CreateDBAccount', 'config-db-web-create' );
413413 }
414 - $s .= Xml::closeElement( 'div' ) . Xml::closeElement( 'fieldset' );
 414+ $s .= Html::closeElement( 'div' ) . Html::closeElement( 'fieldset' );
415415 return $s;
416416 }
417417
Index: trunk/phase3/includes/installer/MysqlInstaller.php
@@ -60,11 +60,11 @@
6161 public function getConnectForm() {
6262 return
6363 $this->getTextBox( 'wgDBserver', 'config-db-host', array(), $this->parent->getHelpBox( 'config-db-host-help' ) ) .
64 - Xml::openElement( 'fieldset' ) .
65 - Xml::element( 'legend', array(), wfMsg( 'config-db-wiki-settings' ) ) .
 64+ Html::openElement( 'fieldset' ) .
 65+ Html::element( 'legend', array(), wfMsg( 'config-db-wiki-settings' ) ) .
6666 $this->getTextBox( 'wgDBname', 'config-db-name', array(), $this->parent->getHelpBox( 'config-db-name-help' ) ) .
6767 $this->getTextBox( 'wgDBprefix', 'config-db-prefix', array(), $this->parent->getHelpBox( 'config-db-prefix-help' ) ) .
68 - Xml::closeElement( 'fieldset' ) .
 68+ Html::closeElement( 'fieldset' ) .
6969 $this->getInstallUserBox();
7070 }
7171
Index: trunk/phase3/includes/installer/OracleInstaller.php
@@ -43,13 +43,13 @@
4444 $this->parent->setVar( '_SameAccount', false );
4545 $this->parent->setVar( '_CreateDBAccount', true );
4646 $this->parent->setVar( 'wgDBname', '' );
47 - return Xml::openElement( 'fieldset' ) .
48 - Xml::element( 'legend', array(), wfMsg( 'config-db-web-account' ) ) .
49 - Xml::openElement( 'div', array( 'id' => 'dbOtherAccount' ) ) .
 47+ return Html::openElement( 'fieldset' ) .
 48+ Html::element( 'legend', array(), wfMsg( 'config-db-web-account' ) ) .
 49+ Html::openElement( 'div', array( 'id' => 'dbOtherAccount' ) ) .
5050 $this->getTextBox( 'wgDBuser', 'config-db-username' ) .
5151 $this->getPasswordBox( 'wgDBpassword', 'config-db-password', array(), $this->parent->getHelpBox( 'config-db-web-help' ) ) .
5252 $this->getCheckBox( '_CreateDBAccount', 'config-db-web-create', array( 'disabled' => true ) ).
53 - Xml::closeElement( 'div' ) . Xml::closeElement( 'fieldset' );
 53+ Html::closeElement( 'div' ) . Html::closeElement( 'fieldset' );
5454 }
5555
5656 public function getConnectForm() {
Index: trunk/phase3/includes/installer/PostgresInstaller.php
@@ -38,12 +38,12 @@
3939 return
4040 $this->getTextBox( 'wgDBserver', 'config-db-host', array(), $this->parent->getHelpBox( 'config-db-host-help' ) ) .
4141 $this->getTextBox( 'wgDBport', 'config-db-port' ) .
42 - Xml::openElement( 'fieldset' ) .
43 - Xml::element( 'legend', array(), wfMsg( 'config-db-wiki-settings' ) ) .
 42+ Html::openElement( 'fieldset' ) .
 43+ Html::element( 'legend', array(), wfMsg( 'config-db-wiki-settings' ) ) .
4444 $this->getTextBox( 'wgDBname', 'config-db-name', array(), $this->parent->getHelpBox( 'config-db-name-help' ) ) .
4545 $this->getTextBox( 'wgDBmwschema', 'config-db-schema', array(), $this->parent->getHelpBox( 'config-db-schema-help' ) ) .
4646 $this->getTextBox( 'wgDBts2schema', 'config-db-ts2-schema' ) .
47 - Xml::closeElement( 'fieldset' ) .
 47+ Html::closeElement( 'fieldset' ) .
4848 $this->getInstallUserBox();
4949 }
5050
Index: trunk/phase3/includes/installer/WebInstallerPage.php
@@ -39,7 +39,7 @@
4040 public function startForm() {
4141 $this->addHTML(
4242 "<div class=\"config-section\">\n" .
43 - Xml::openElement(
 43+ Html::openElement(
4444 'form',
4545 array(
4646 'method' => 'post',
@@ -235,7 +235,7 @@
236236 */
237237 public function getLanguageSelector( $name, $label, $selectedCode ) {
238238 global $wgDummyLanguageCodes;
239 - $s = Xml::openElement( 'select', array( 'id' => $name, 'name' => $name ) ) . "\n";
 239+ $s = Html::openElement( 'select', array( 'id' => $name, 'name' => $name ) ) . "\n";
240240
241241 $languages = Language::getLanguageNames();
242242 ksort( $languages );
@@ -314,8 +314,8 @@
315315 "</li>\n";
316316
317317 $settings .=
318 - Xml::openElement( 'div', array( 'id' => 'DB_wrapper_' . $type, 'class' => 'dbWrapper' ) ) .
319 - Xml::element( 'h3', array(), wfMsg( 'config-header-' . $type ) ) .
 318+ Html::openElement( 'div', array( 'id' => 'DB_wrapper_' . $type, 'class' => 'dbWrapper' ) ) .
 319+ Html::element( 'h3', array(), wfMsg( 'config-header-' . $type ) ) .
320320 $installer->getConnectForm() .
321321 "</div>\n";
322322 }
@@ -802,7 +802,7 @@
803803
804804 return
805805 "<div class=\"config-cc-wrapper\" id=\"config-cc-wrapper\" style=\"display: none;\">\n" .
806 - Xml::element( 'iframe', $iframeAttribs, '', false /* not short */ ) .
 806+ Html::element( 'iframe', $iframeAttribs, '', false /* not short */ ) .
807807 "</div>\n";
808808 }
809809
@@ -813,12 +813,12 @@
814814 $reduceJs = str_replace( '$1', '70px', $js );
815815 return
816816 '<p>'.
817 - Xml::element( 'img', array( 'src' => $this->getVar( 'wgRightsIcon' ) ) ) .
 817+ Html::element( 'img', array( 'src' => $this->getVar( 'wgRightsIcon' ) ) ) .
818818 '&#160;&#160;' .
819819 htmlspecialchars( $this->getVar( 'wgRightsText' ) ) .
820820 "</p>\n" .
821821 "<p style=\"text-align: center\">" .
822 - Xml::element( 'a',
 822+ Html::element( 'a',
823823 array(
824824 'href' => $this->getCCPartnerUrl(),
825825 'onclick' => $expandJs,

Follow-up revisions

RevisionCommit summaryAuthorDate
r76056Followup r76055, missed a few moredemon23:23, 4 November 2010

Status & tagging log