Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
0.00% |
0 / 17 |
|
0.00% |
0 / 1 |
CRAP | |
0.00% |
0 / 1 |
| WebInstallerDBSettings | |
0.00% |
0 / 17 |
|
0.00% |
0 / 1 |
30 | |
0.00% |
0 / 1 |
| execute | |
0.00% |
0 / 17 |
|
0.00% |
0 / 1 |
30 | |||
| 1 | <?php |
| 2 | /** |
| 3 | * @license GPL-2.0-or-later |
| 4 | * @file |
| 5 | * @ingroup Installer |
| 6 | */ |
| 7 | |
| 8 | namespace MediaWiki\Installer; |
| 9 | |
| 10 | class WebInstallerDBSettings extends WebInstallerPage { |
| 11 | |
| 12 | /** |
| 13 | * @return string|null |
| 14 | */ |
| 15 | public function execute() { |
| 16 | $installer = $this->parent->getDBInstaller( $this->getVar( 'wgDBtype' ) ); |
| 17 | $form = $installer->getSettingsForm( $this->parent ); |
| 18 | |
| 19 | $r = $this->parent->request; |
| 20 | if ( $r->wasPosted() ) { |
| 21 | $status = $form->submit(); |
| 22 | if ( $status === false ) { |
| 23 | return 'skip'; |
| 24 | } elseif ( $status->isGood() ) { |
| 25 | return 'continue'; |
| 26 | } else { |
| 27 | $this->parent->showStatusBox( $status ); |
| 28 | } |
| 29 | } |
| 30 | |
| 31 | $formHtml = $form->getHtml(); |
| 32 | if ( $formHtml === false ) { |
| 33 | return 'skip'; |
| 34 | } |
| 35 | |
| 36 | $this->startForm(); |
| 37 | $this->addHTML( $formHtml ); |
| 38 | $this->endForm(); |
| 39 | |
| 40 | return null; |
| 41 | } |
| 42 | |
| 43 | } |