*/
public function __construct( $location ) {
$this->location = $location;
- }
+ }
+
+ /**
+ * Returns the repository location.
+ *
+ * @since 1.17
+ *
+ * @return string
+ */
+ public function getLocation() {
+ return $this->location;
+ }
}
\ No newline at end of file
'config-env-php' => 'PHP $1 is installed.',
'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' => "'''Note:''' The installer was unable to retrieve information about the latest MediaWiki release from [$1].",
- 'config-env-latest-data-invalid' => "'''Warning:''' When trying to check if this version was outdated invalid data was retrieved from [$1].",
+ 'config-env-latest-can-not-check' => "'''Warning:''' The installer was unable to retrieve information about the latest MediaWiki release from [$1].",
'config-env-latest-old' => "'''Warning:''' You are installing an outdated version of Mediawiki.",
'config-env-latest-help' => 'You are installing version $1, but the latest version is $2.
You are advised to use the latest release, which can be downloaded from [http://www.mediawiki.org/wiki/Download mediawiki.org]',
$repository = wfGetRepository();
$currentVersion = $repository->getLatestCoreVersion();
-
- /*
- if( !$latestInfo ) {
- $this->showMessage( 'config-env-latest-can-not-check', $latestInfoUrl );
- return;
- }
- */
$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
- $this->showMessage( 'config-env-latest-data-invalid', $latestInfoUrl );
+ $this->showMessage( 'config-env-latest-can-not-check', $repository->getLocation() );
return;
}
if( version_compare( $wgVersion, $currentVersion, '<' ) ) {
$this->showMessage( 'config-env-latest-old' );
+ // FIXME: this only works for the web installer!
$this->showHelpBox( 'config-env-latest-help', $wgVersion, $currentVersion );
} elseif( version_compare( $wgVersion, $currentVersion, '>' ) ) {
$this->showMessage( 'config-env-latest-new' );
if ( !$compiledDBs ) {
$this->showMessage( 'config-no-db' );
+ // FIXME: this only works for the web installer!
$this->showHelpBox( 'config-no-db-help', $wgLang->commaList( $allNames ) );
return false;
}