Debian Codegraph @

includes/installer/WebInstallerWelcome.php

raw symbols SCIP
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
23 namespace MediaWiki\Installer;
24
25 use MediaWiki\Specials\SpecialVersion;
26
27 class 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->showSuccess( 'config-env-good' );
40 $this->parent->output->addWikiTextAsInterface(
41 wfMessage( 'config-welcome-section-copyright',
42 SpecialVersion::getCopyrightAndAuthorList(),
43 $this->parent->getVar( 'wgServer' ) .
44 $this->parent->getDocUrl( 'Copying' )
45 )->plain()
46 );
47 $this->startForm();
48 $this->endForm();
49 } else {
50 $this->parent->showStatusMessage( $status );
51 }
52
53 return '';
54 }
55
56 }