diff options
author | Tim Hollmann <me@tim-hollmann.de> | 2016-01-05 21:48:25 +0100 |
---|---|---|
committer | Reedy <reedy@wikimedia.org> | 2016-01-07 19:03:30 +0000 |
commit | 6d55397e7cb6f2001f8635dee7c2a78d6ad1a23e (patch) | |
tree | 375aae599f90bafe7709abaa6cc1a6054f4c8fcf /includes/installer/WebInstallerWelcome.php | |
parent | d676a1ca6ec1163f391f9a1305cddd503b7c5a22 (diff) | |
download | mediawikicore-6d55397e7cb6f2001f8635dee7c2a78d6ad1a23e.tar.gz mediawikicore-6d55397e7cb6f2001f8635dee7c2a78d6ad1a23e.zip |
Split the classes in WebInstallerPage.php into multiple files
Bug: T122634
Change-Id: If6606a0e1c2a5ec5651cc7f83cf7342ff8c6c765
Diffstat (limited to 'includes/installer/WebInstallerWelcome.php')
-rw-r--r-- | includes/installer/WebInstallerWelcome.php | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/includes/installer/WebInstallerWelcome.php b/includes/installer/WebInstallerWelcome.php new file mode 100644 index 000000000000..e0117705908f --- /dev/null +++ b/includes/installer/WebInstallerWelcome.php @@ -0,0 +1,51 @@ +<?php +/** + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * http://www.gnu.org/copyleft/gpl.html + * + * @file + * @ingroup Deployment + */ + +class WebInstallerWelcome extends WebInstallerPage { + + /** + * @return string + */ + public function execute() { + if ( $this->parent->request->wasPosted() ) { + if ( $this->getVar( '_Environment' ) ) { + return 'continue'; + } + } + $this->parent->output->addWikiText( wfMessage( 'config-welcome' )->plain() ); + $status = $this->parent->doEnvironmentChecks(); + if ( $status->isGood() ) { + $this->parent->output->addHTML( '<span class="success-message">' . + wfMessage( 'config-env-good' )->escaped() . '</span>' ); + $this->parent->output->addWikiText( wfMessage( 'config-copyright', + SpecialVersion::getCopyrightAndAuthorList() )->plain() ); + $this->startForm(); + $this->endForm(); + } else { + $this->parent->showStatusMessage( $status ); + } + + return ''; + } + +} + + |