Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
0.00% covered (danger)
0.00%
0 / 21
0.00% covered (danger)
0.00%
0 / 1
CRAP
0.00% covered (danger)
0.00%
0 / 1
WebInstallerComplete
0.00% covered (danger)
0.00%
0 / 21
0.00% covered (danger)
0.00%
0 / 1
12
0.00% covered (danger)
0.00%
0 / 1
 execute
0.00% covered (danger)
0.00%
0 / 21
0.00% covered (danger)
0.00%
0 / 1
12
1<?php
2/**
3 * @license GPL-2.0-or-later
4 * @file
5 * @ingroup Installer
6 */
7
8namespace MediaWiki\Installer;
9
10class WebInstallerComplete extends WebInstallerPage {
11
12    /** @inheritDoc */
13    public function execute() {
14        // Pop up a dialog box, to make it difficult for the user to forget
15        // to download the file
16        $lsPath = $this->parent->getUrl( [ 'localsettings' => 1 ] );
17        $lsUrl = $this->parent->getDefaultServer() . $lsPath;
18        $this->parent->request->response()->header( "Refresh: 0;url=$lsPath" );
19        $this->startForm();
20        $this->parent->disableLinkPopups();
21        $location = $this->parent->getLocalSettingsLocation();
22        $msg = 'config-install-done';
23        if ( $location !== false ) {
24            $msg = 'config-install-done-path';
25        }
26        $this->parent->showSuccess( $msg,
27            $lsUrl,
28            $this->getVar( 'wgServer' ) .
29                $this->getVar( 'wgScriptPath' ) . '/index.php',
30            "[$lsUrl " . wfMessage( 'config-download-localsettings' )->plain() . ']',
31            $location ?: ''
32        );
33        $this->addHTML( $this->parent->getInfoBox(
34            wfMessage( 'config-extension-link' )->plain() ) );
35
36        $this->parent->restoreLinkPopups();
37        $this->endForm( false, false );
38        return '';
39    }
40
41}