MediaWiki
master
Toggle main menu visibility
WebInstallerInstall.php
Go to the documentation of this file.
1
<?php
2
8
9
namespace
MediaWiki\Installer;
10
11
use MediaWiki\Installer\Task\Task;
12
use MediaWiki\Status\Status;
13
14
class
WebInstallerInstall
extends
WebInstallerPage
{
15
19
public
function
isSlow
() {
20
return
true
;
21
}
22
26
public
function
execute
() {
27
if
( $this->
getVar
(
'_UpgradeDone'
) ) {
28
return
'skip'
;
29
} elseif ( $this->
getVar
(
'_InstallDone'
) ) {
30
return
'continue'
;
31
} elseif ( $this->parent->request->wasPosted() ) {
32
$this->
startForm
();
33
$this->
addHTML
(
"<ul>"
);
34
$status = $this->parent->performInstallation(
35
$this->
startStage
( ... ),
36
$this->
endStage
( ... )
37
);
38
$this->
addHTML
(
"</ul>"
);
39
$continue = $status->isOK() ?
'continue'
:
false
;
40
$back = $status->isOK() ? false :
'back'
;
41
$this->
endForm
( $continue, $back );
42
}
else
{
43
$this->
startForm
();
44
$this->
addHTML
( $this->parent->getInfoBox(
wfMessage
(
'config-install-begin'
)->plain() ) );
45
$this->
endForm
();
46
}
47
48
return
true
;
49
}
50
54
public
function
startStage
( $task ) {
55
$this->
addHTML
(
"<li>"
. $task->getDescriptionMessage()->escaped() .
56
wfMessage
(
'ellipsis'
)->escaped() );
57
58
if
( $task->getName() ==
'extension-tables'
) {
59
$this->
startLiveBox
();
60
}
61
}
62
67
public
function
endStage
( $task, $status ) {
68
if
( $task->getName() ==
'extension-tables'
) {
69
$this->
endLiveBox
();
70
}
71
$msg = $status->isOK() ?
'config-install-step-done'
:
'config-install-step-failed'
;
72
$html =
wfMessage
(
'word-separator'
)->escaped() .
wfMessage
( $msg )->escaped();
73
if
( !$status->isOK() ) {
74
$html =
"<span class=\"error\">$html</span>"
;
75
}
76
$this->
addHTML
( $html .
"</li>\n"
);
77
if
( !$status->isGood() ) {
78
$this->parent->showStatusBox( $status );
79
}
80
}
81
82
}
wfMessage
wfMessage( $key,... $params)
This is the function for getting translated interface messages.
Definition
GlobalFunctions.php:548
MediaWiki\Installer\WebInstallerInstall
Definition
WebInstallerInstall.php:14
MediaWiki\Installer\WebInstallerInstall\isSlow
isSlow()
Definition
WebInstallerInstall.php:19
MediaWiki\Installer\WebInstallerInstall\startStage
startStage( $task)
Definition
WebInstallerInstall.php:54
MediaWiki\Installer\WebInstallerInstall\endStage
endStage( $task, $status)
Definition
WebInstallerInstall.php:67
MediaWiki\Installer\WebInstallerInstall\execute
execute()
Definition
WebInstallerInstall.php:26
MediaWiki\Installer\WebInstallerPage
Abstract class to define pages for the web installer.
Definition
WebInstallerPage.php:19
MediaWiki\Installer\WebInstallerPage\endForm
endForm( $continue='continue', $back='back')
Definition
WebInstallerPage.php:72
MediaWiki\Installer\WebInstallerPage\getVar
getVar( $var, $default=null)
Definition
WebInstallerPage.php:140
MediaWiki\Installer\WebInstallerPage\startLiveBox
startLiveBox()
Opens a textarea used to display the progress of a long operation.
Definition
WebInstallerPage.php:176
MediaWiki\Installer\WebInstallerPage\addHTML
addHTML( $html)
Definition
WebInstallerPage.php:51
MediaWiki\Installer\WebInstallerPage\endLiveBox
endLiveBox()
Opposite to WebInstallerPage\startLiveBox.
Definition
WebInstallerPage.php:190
MediaWiki\Installer\WebInstallerPage\startForm
startForm()
Definition
WebInstallerPage.php:55
includes
Installer
WebInstallerInstall.php
Generated on
for MediaWiki by
1.18.0