Index: branches/new-installer/phase3/includes/installer/WebInstaller.php |
— | — | @@ -751,8 +751,12 @@ |
752 | 752 | $this->parent = $parent; |
753 | 753 | } |
754 | 754 | |
| 755 | + function addHTML( $html ) { |
| 756 | + $this->parent->output->addHTML( $html ); |
| 757 | + } |
| 758 | + |
755 | 759 | function startForm() { |
756 | | - $this->parent->output->addHTML( |
| 760 | + $this->addHTML( |
757 | 761 | "<div class=\"config-section\">\n" . |
758 | 762 | Xml::openElement( |
759 | 763 | 'form', |
— | — | @@ -790,7 +794,7 @@ |
791 | 795 | ) ) . "\n"; |
792 | 796 | } |
793 | 797 | $s .= "</div></form></div>\n"; |
794 | | - $this->parent->output->addHTML( $s ); |
| 798 | + $this->addHTML( $s ); |
795 | 799 | } |
796 | 800 | |
797 | 801 | function getName() { |
— | — | @@ -806,7 +810,7 @@ |
807 | 811 | return 'continue'; |
808 | 812 | } else { |
809 | 813 | $this->startForm(); |
810 | | - $this->parent->output->addHTML( 'Mockup' ); |
| 814 | + $this->addHTML( 'Mockup' ); |
811 | 815 | $this->endForm(); |
812 | 816 | } |
813 | 817 | } |
— | — | @@ -883,7 +887,7 @@ |
884 | 888 | $this->parent->getHelpBox( 'config-wiki-language-help' ); |
885 | 889 | |
886 | 890 | |
887 | | - $this->parent->output->addHTML( $s ); |
| 891 | + $this->addHTML( $s ); |
888 | 892 | $this->endForm(); |
889 | 893 | } |
890 | 894 | |
— | — | @@ -967,7 +971,7 @@ |
968 | 972 | $types .= "</ul><br clear=\"left\"/>\n"; |
969 | 973 | $encType = Xml::encodeJsVar( $defaultType ); |
970 | 974 | |
971 | | - $this->parent->output->addHTML( |
| 975 | + $this->addHTML( |
972 | 976 | $this->parent->label( 'config-db-type', false, $types ) . |
973 | 977 | $settings . |
974 | 978 | "<script type=\"text/javascript\">resetDBArea();</script>\n" |
— | — | @@ -1021,14 +1025,14 @@ |
1022 | 1026 | } |
1023 | 1027 | |
1024 | 1028 | $this->startForm(); |
1025 | | - $this->parent->output->addHTML( $this->parent->getInfoBox( |
| 1029 | + $this->addHTML( $this->parent->getInfoBox( |
1026 | 1030 | wfMsgNoTrans( 'config-can-upgrade', $GLOBALS['wgVersion'] ) ) ); |
1027 | 1031 | $this->endForm(); |
1028 | 1032 | } |
1029 | 1033 | |
1030 | 1034 | function showDoneMessage() { |
1031 | 1035 | $this->startForm(); |
1032 | | - $this->parent->output->addHTML( |
| 1036 | + $this->addHTML( |
1033 | 1037 | $this->parent->getInfoBox( |
1034 | 1038 | wfMsgNoTrans( 'config-upgrade-done', |
1035 | 1039 | $GLOBALS['wgServer'] . |
— | — | @@ -1063,7 +1067,7 @@ |
1064 | 1068 | } |
1065 | 1069 | |
1066 | 1070 | $this->startForm(); |
1067 | | - $this->parent->output->addHTML( $form ); |
| 1071 | + $this->addHTML( $form ); |
1068 | 1072 | $this->endForm(); |
1069 | 1073 | } |
1070 | 1074 | |
— | — | @@ -1086,7 +1090,7 @@ |
1087 | 1091 | $js = 'enableControlArray("config__NamespaceType_other", ["config_wgMetaNamespace"])'; |
1088 | 1092 | $attribs = array( 'onclick' => $js ); |
1089 | 1093 | |
1090 | | - $this->parent->output->addHTML( |
| 1094 | + $this->addHTML( |
1091 | 1095 | $this->parent->getTextBox( array( |
1092 | 1096 | 'var' => 'wgSitename', |
1093 | 1097 | 'label' => 'config-site-name', |
— | — | @@ -1245,7 +1249,7 @@ |
1246 | 1250 | $uploadJs = 'enableControlArray("config_wgEnableUploads", ["config_wgDeletedDirectory"]);'; |
1247 | 1251 | |
1248 | 1252 | $this->startForm(); |
1249 | | - $this->parent->output->addHTML( |
| 1253 | + $this->addHTML( |
1250 | 1254 | # User Rights |
1251 | 1255 | $this->parent->getRadioSet( array( |
1252 | 1256 | 'var' => '_RightsProfile', |
— | — | @@ -1313,10 +1317,10 @@ |
1314 | 1318 | ) ); |
1315 | 1319 | } |
1316 | 1320 | $extHtml .= $this->parent->getFieldsetEnd(); |
1317 | | - $this->parent->output->addHTML( $extHtml ); |
| 1321 | + $this->addHTML( $extHtml ); |
1318 | 1322 | } |
1319 | 1323 | |
1320 | | - $this->parent->output->addHTML( |
| 1324 | + $this->addHTML( |
1321 | 1325 | # Uploading |
1322 | 1326 | $this->parent->getFieldsetStart( 'config-upload-settings' ) . |
1323 | 1327 | $this->parent->getCheckBox( array( |
— | — | @@ -1344,7 +1348,7 @@ |
1345 | 1349 | } |
1346 | 1350 | $caches[] = 'memcached'; |
1347 | 1351 | |
1348 | | - $this->parent->output->addHTML( |
| 1352 | + $this->addHTML( |
1349 | 1353 | # Advanced settings |
1350 | 1354 | $this->parent->getFieldsetStart( 'config-advanced-settings' ) . |
1351 | 1355 | # Object cache settings |
— | — | @@ -1447,7 +1451,7 @@ |
1448 | 1452 | return; |
1449 | 1453 | } |
1450 | 1454 | $this->setVar( '_CCDone', true ); |
1451 | | - $this->parent->output->addHTML( $this->getCCDoneBox() ); |
| 1455 | + $this->addHTML( $this->getCCDoneBox() ); |
1452 | 1456 | } |
1453 | 1457 | |
1454 | 1458 | function submit() { |
— | — | @@ -1502,20 +1506,21 @@ |
1503 | 1507 | } |
1504 | 1508 | $this->startForm(); |
1505 | 1509 | $this->parent->exportVars(); |
1506 | | - $this->parent->output->addHTML("<ul>"); |
| 1510 | + $this->addHTML("<ul>"); |
1507 | 1511 | foreach( $this->parent->getInstallSteps() as $step ) { |
1508 | 1512 | $this->startStage( "config-install-$step" ); |
1509 | 1513 | $func = 'install' . ucfirst( $step ); |
1510 | 1514 | $success = $this->parent->{$func}(); |
1511 | 1515 | $this->endStage( $success ); |
1512 | 1516 | } |
| 1517 | + $this->addHTML("</ul>"); |
1513 | 1518 | $this->endForm(); |
1514 | 1519 | return true; |
1515 | 1520 | |
1516 | 1521 | } |
1517 | 1522 | |
1518 | 1523 | private function startStage( $msg ) { |
1519 | | - $this->parent->output->addHTML( "<li>" . wfMsgHtml( $msg ) . wfMsg( 'ellipsis') ); |
| 1524 | + $this->addHTML( "<li>" . wfMsgHtml( $msg ) . wfMsg( 'ellipsis') ); |
1520 | 1525 | } |
1521 | 1526 | |
1522 | 1527 | private function endStage( $success = true ) { |
— | — | @@ -1524,7 +1529,7 @@ |
1525 | 1530 | if ( !$success ) { |
1526 | 1531 | $html = "<span class=\"error\">$html</span>"; |
1527 | 1532 | } |
1528 | | - $this->parent->output->addHTML( $html . "</li>\n" ); |
| 1533 | + $this->addHTML( $html . "</li>\n" ); |
1529 | 1534 | } |
1530 | 1535 | } |
1531 | 1536 | class WebInstaller_Complete extends WebInstallerPage { |
— | — | @@ -1532,7 +1537,7 @@ |
1533 | 1538 | global $IP; |
1534 | 1539 | $this->startForm(); |
1535 | 1540 | $msg = file_exists( "$IP/LocalSettings.php" ) ? 'config-install-done-moved' : 'config-install-done'; |
1536 | | - $this->parent->output->addHTML( |
| 1541 | + $this->addHTML( |
1537 | 1542 | $this->parent->getInfoBox( |
1538 | 1543 | wfMsgNoTrans( $msg, |
1539 | 1544 | $GLOBALS['wgServer'] . |
— | — | @@ -1559,7 +1564,7 @@ |
1560 | 1565 | |
1561 | 1566 | $this->startForm(); |
1562 | 1567 | $s = $this->parent->getWarningBox( wfMsgNoTrans( 'config-help-restart' ) ); |
1563 | | - $this->parent->output->addHTML( $s ); |
| 1568 | + $this->addHTML( $s ); |
1564 | 1569 | $this->endForm( 'restart' ); |
1565 | 1570 | } |
1566 | 1571 | } |