}
class WebInstaller_Language extends WebInstallerPage {
- function execute() {
+
+ public function execute() {
global $wgLang;
$r = $this->parent->request;
$userLang = $r->getVal( 'UserLang' );
}
/**
- * Get a <select> for selecting languages
+ * Get a <select> for selecting languages.
*/
- function getLanguageSelector( $name, $label, $selectedCode ) {
+ public function getLanguageSelector( $name, $label, $selectedCode ) {
global $wgDummyLanguageCodes;
$s = Xml::openElement( 'select', array( 'id' => $name, 'name' => $name ) ) . "\n";
$s .= "\n</select>\n";
return $this->parent->label( $label, $name, $s );
}
+
}
class WebInstaller_Welcome extends WebInstallerPage {
- function execute() {
+
+ public function execute() {
if ( $this->parent->request->wasPosted() ) {
if ( $this->getVar( '_Environment' ) ) {
return 'continue';
$this->endForm();
}
}
+
}
class WebInstaller_DBConnect extends WebInstallerPage {
- function execute() {
+
+ public function execute() {
$r = $this->parent->request;
if ( $r->wasPosted() ) {
$status = $this->submit();
}
}
-
$this->startForm();
$types = "<ul class=\"config-settings-block\">\n";
$this->endForm();
}
- function submit() {
+ public function submit() {
$r = $this->parent->request;
$type = $r->getVal( 'DBType' );
$this->setVar( 'wgDBtype', $type );
}
return $installer->submitConnectForm();
}
+
}
class WebInstaller_Upgrade extends WebInstallerPage {
- function execute() {
+
+ public function execute() {
if ( $this->getVar( '_UpgradeDone' ) ) {
if ( $this->parent->request->wasPosted() ) {
// Done message acknowledged
$this->endForm();
}
- function showDoneMessage() {
+ public function showDoneMessage() {
$this->startForm();
$this->addHTML(
$this->parent->getInfoBox(
);
$this->endForm( 'regenerate' );
}
+
}
class WebInstaller_DBSettings extends WebInstallerPage {
- function execute() {
+
+ public function execute() {
$installer = $this->parent->getDBInstaller( $this->getVar( 'wgDBtype' ) );
$r = $this->parent->request;
}
class WebInstaller_Name extends WebInstallerPage {
- function execute() {
+
+ public function execute() {
$r = $this->parent->request;
if ( $r->wasPosted() ) {
if ( $this->submit() ) {
return 'output';
}
- function submit() {
+ public function submit() {
$retVal = true;
$this->parent->setVarsFromRequest( array( 'wgSitename', '_NamespaceType',
'_AdminName', '_AdminPassword', '_AdminPassword2', '_AdminEmail',
}
return $retVal;
}
+
}
class WebInstaller_Options extends WebInstallerPage {
- function execute() {
+
+ public function execute() {
if ( $this->getVar( '_SkipOptional' ) == 'skip' ) {
return 'skip';
}
$this->endForm();
}
- function getCCPartnerUrl() {
+ public function getCCPartnerUrl() {
global $wgServer;
$exitUrl = $wgServer . $this->parent->getUrl( array(
'page' => 'Options',
return $iframeUrl;
}
- function getCCChooser() {
+ public function getCCChooser() {
$iframeAttribs = array(
'class' => 'config-cc-iframe',
'name' => 'config-cc-iframe',
"</div>\n";
}
- function getCCDoneBox() {
+ public function getCCDoneBox() {
$js = "parent.document.getElementById('config-cc-wrapper').style.height = '$1';";
// If you change this height, also change it in config.css
$expandJs = str_replace( '$1', '54em', $js );
"</script>\n";
}
-
- function submitCC() {
+ public function submitCC() {
$newValues = $this->parent->setVarsFromRequest(
array( 'wgRightsUrl', 'wgRightsText', 'wgRightsIcon' ) );
if ( count( $newValues ) != 3 ) {
$this->addHTML( $this->getCCDoneBox() );
}
- function submit() {
+ public function submit() {
$this->parent->setVarsFromRequest( array( '_RightsProfile', '_LicenseCode',
'wgEnableEmail', 'wgPasswordSender', 'wgEnableUpload', 'wgLogo',
'wgEnableUserEmail', 'wgEnotifUserTalk', 'wgEnotifWatchlist',
$this->parent->setVar( '_Extensions', $exts );
return true;
}
+
}
class WebInstaller_Install extends WebInstallerPage {
- function execute() {
+ public function execute() {
if( $this->parent->request->wasPosted() ) {
return 'continue';
} elseif( $this->getVar( '_InstallDone' ) ) {
$this->parent->showStatusBox( $status );
}
}
+
}
class WebInstaller_Complete extends WebInstallerPage {
+
public function execute() {
global $IP;
$this->startForm();
}
class WebInstaller_Restart extends WebInstallerPage {
- function execute() {
+
+ public function execute() {
$r = $this->parent->request;
if ( $r->wasPosted() ) {
$really = $r->getVal( 'submit-restart' );
$this->addHTML( $s );
$this->endForm( 'restart' );
}
+
}
abstract class WebInstaller_Document extends WebInstallerPage {
- abstract function getFileName();
+
+ protected abstract function getFileName();
- function execute() {
+ public function execute() {
$text = $this->getFileContents();
$this->parent->output->addWikiText( $text );
$this->startForm();
$this->endForm( false );
}
- function getFileContents() {
+ public function getFileContents() {
return file_get_contents( dirname( __FILE__ ) . '/../../' . $this->getFileName() );
}
return '<span class="config-plainlink">[http://www.mediawiki.org/wiki/Manual:' .
$matches[1] . ' ' . $matches[1] . ']</span>';
}
+
}
class WebInstaller_Readme extends WebInstaller_Document {
- function getFileName() { return 'README'; }
+
+ protected function getFileName() { return 'README'; }
- function getFileContents() {
+ public function getFileContents() {
return $this->formatTextFile( parent::getFileContents() );
}
+
}
class WebInstaller_ReleaseNotes extends WebInstaller_Document {
- function getFileName() { return 'RELEASE-NOTES'; }
+
+ protected function getFileName() { return 'RELEASE-NOTES'; }
- function getFileContents() {
+ public function getFileContents() {
return $this->formatTextFile( parent::getFileContents() );
}
+
}
class WebInstaller_UpgradeDoc extends WebInstaller_Document {
- function getFileName() { return 'UPGRADE'; }
+
+ protected function getFileName() { return 'UPGRADE'; }
- function getFileContents() {
+ public function getFileContents() {
return $this->formatTextFile( parent::getFileContents() );
}
+
}
class WebInstaller_Copying extends WebInstaller_Document {
- function getFileName() { return 'COPYING'; }
+
+ protected function getFileName() { return 'COPYING'; }
- function getFileContents() {
+ public function getFileContents() {
$text = parent::getFileContents();
$text = str_replace( "\x0C", '', $text );
$text = preg_replace_callback( '/\n[ \t]+/m', array( 'WebInstaller_Copying', 'replaceLeadingSpaces' ), $text );
private static function replaceLeadingSpaces( $matches ) {
return "\n" . str_repeat( ' ', strlen( $matches[0] ) );
}
+
}
\ No newline at end of file