'config-your-language-help' => 'Select a language to use during the installation process.',
'config-wiki-language' => 'Wiki language:',
'config-wiki-language-help' => 'Select the language that the wiki will predominantly be written in.',
+ 'config-allow-requests' => 'Allow external requests to MediaWiki.org',
+ 'config-allow-requests-help' => 'If enabled, allow the installer to check MediaWiki.org to make sure you are installing the latest stable version',
'config-back' => '← Back',
'config-continue' => 'Continue →',
'config-page-language' => 'Language',
'config-env-bad' => 'The environment has been checked.
You cannot install MediaWiki.',
'config-env-php' => 'PHP $1 is installed.',
+ 'config-env-latest-disabled' => 'External HTTP requests disabled, skipping version check',
'config-env-latest-ok' => 'You are installing the latest version of MediaWiki.',
'config-env-latest-new' => "'''Note:''' You are installing a development version of MediaWiki.",
'config-env-latest-can-not-check' => "'''Warning:''' The installer was unable to retrieve information about the latest MediaWiki release from [$1].",
public function envLatestVersion() {
global $wgVersion;
+ if( !$this->getVar( '_ExternalHTTP' ) ) {
+ $this->showMessage( 'config-env-latest-disabled' );
+ return;
+ }
+
$repository = wfGetRepository();
$currentVersion = $repository->getLatestCoreVersion();
- $this->setVar( '_ExternalHTTP', true );
-
if ( $currentVersion === false ) {
# For when the request is successful but there's e.g. some silly man in
# the middle firewall blocking us, e.g. one of those annoying airport ones
if ( isset( $languages[$contLang] ) ) {
$this->setVar( 'wgLanguageCode', $contLang );
}
+ $this->setVar( '_ExternalHTTP', $r->getBool( 'config__ExternalHTTP' ) );
return 'continue';
}
} elseif ( $this->parent->showSessionWarning ) {
$this->getLanguageSelector( 'UserLang', 'config-your-language', $userLang ) .
$this->parent->getHelpBox( 'config-your-language-help' ) .
$this->getLanguageSelector( 'ContLang', 'config-wiki-language', $contLang ) .
- $this->parent->getHelpBox( 'config-wiki-language-help' );
-
+ $this->parent->getHelpBox( 'config-wiki-language-help' ) .
+ $this->parent->getCheckBox(
+ array( 'var' => '_ExternalHTTP', 'label' => 'config-allow-requests' )
+ ) . $this->parent->getHelpBox( 'config-allow-requests-help' );
$this->addHTML( $s );
$this->endForm();