parent = $parent;
}
/**
* Is this a slow-running page in the installer? If so, WebInstaller will
* set_time_limit(0) before calling execute(). Right now this only applies
* to Install and Upgrade pages
*
* @return bool Always false in this default implementation.
*/
public function isSlow() {
return false;
}
/**
* @param string $html
*/
public function addHTML( $html ) {
$this->parent->output->addHTML( $html );
}
public function startForm() {
$this->addHTML(
"
\n" .
Html::openElement(
'form',
[
'method' => 'post',
'action' => $this->parent->getUrl( [ 'page' => $this->getName() ] )
]
) . "\n"
);
}
/**
* @param string|bool $continue
* @param string|bool $back
*/
public function endForm( $continue = 'continue', $back = 'back' ) {
$s = "
\n";
$id = $this->getId();
if ( $id === false ) {
$s .= Html::hidden( 'lastPage', $this->parent->request->getVal( 'lastPage' ) );
}
if ( $continue ) {
// Fake submit button for enter keypress (T28267)
// Messages: config-continue, config-restart, config-regenerate
$s .= Xml::submitButton(
wfMessage( "config-$continue" )->text(),
[
'name' => "enter-$continue",
'style' => 'width:0;border:0;height:0;padding:0'
]
) . "\n";
}
if ( $back ) {
// Message: config-back
$s .= Xml::submitButton(
wfMessage( "config-$back" )->text(),
[
'name' => "submit-$back",
'tabindex' => $this->parent->nextTabIndex()
]
) . "\n";
}
if ( $continue ) {
// Messages: config-continue, config-restart, config-regenerate
$s .= Xml::submitButton(
wfMessage( "config-$continue" )->text(),
[
'name' => "submit-$continue",
'tabindex' => $this->parent->nextTabIndex(),
]
) . "\n";
}
$s .= "
\n";
$this->addHTML( $s );
}
/**
* @return string
*/
public function getName() {
return str_replace( 'WebInstaller', '', static::class );
}
/**
* @return string
*/
protected function getId() {
return array_search( $this->getName(), $this->parent->pageSequence );
}
/**
* @param string $var
* @param mixed|null $default
*
* @return mixed
*/
public function getVar( $var, $default = null ) {
return $this->parent->getVar( $var, $default );
}
/**
* @param string $name
* @param mixed $value
*/
public function setVar( $name, $value ) {
$this->parent->setVar( $name, $value );
}
/**
* Get the starting tags of a fieldset.
*
* @param string $legend Message name
*
* @return string
*/
protected function getFieldsetStart( $legend ) {
return "\n