Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
0.00% covered (danger)
0.00%
0 / 20
0.00% covered (danger)
0.00%
0 / 1
CRAP
0.00% covered (danger)
0.00%
0 / 1
WebInstallerWelcome
0.00% covered (danger)
0.00%
0 / 20
0.00% covered (danger)
0.00%
0 / 1
20
0.00% covered (danger)
0.00%
0 / 1
 execute
0.00% covered (danger)
0.00%
0 / 20
0.00% covered (danger)
0.00%
0 / 1
20
1<?php
2
3/**
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License along
15 * with this program; if not, write to the Free Software Foundation, Inc.,
16 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
17 * http://www.gnu.org/copyleft/gpl.html
18 *
19 * @file
20 * @ingroup Installer
21 */
22
23namespace MediaWiki\Installer;
24
25use MediaWiki\Specials\SpecialVersion;
26
27class WebInstallerWelcome extends WebInstallerPage {
28
29    /**
30     * @return string
31     */
32    public function execute() {
33        if ( $this->parent->request->wasPosted() && $this->getVar( '_Environment' ) ) {
34            return 'continue';
35        }
36        $this->parent->output->addWikiTextAsInterface( wfMessage( 'config-welcome' )->plain() );
37        $status = $this->parent->doEnvironmentChecks();
38        if ( $status->isGood() ) {
39            $this->parent->output->addHTML(
40                '<div class="cdx-message cdx-message--block cdx-message--success">' .
41                '<span class="cdx-message__icon"></span> <div class="cdx-message__content">' .
42                wfMessage( 'config-env-good' )->escaped() . '</div></div>' );
43            $this->parent->output->addWikiTextAsInterface(
44                wfMessage( 'config-welcome-section-copyright',
45                    SpecialVersion::getCopyrightAndAuthorList(),
46                    $this->parent->getVar( 'wgServer' ) .
47                        $this->parent->getDocUrl( 'Copying' )
48                )->plain()
49            );
50            $this->startForm();
51            $this->endForm();
52        } else {
53            $this->parent->showStatusMessage( $status );
54        }
55
56        return '';
57    }
58
59}