From: Jeroen De Dauw Date: Sun, 15 Aug 2010 16:42:43 +0000 (+0000) Subject: Error message tweaks X-Git-Tag: 1.31.0-rc.0~35477 X-Git-Url: http://git.cyclocoop.org/%22.%24info%5B?a=commitdiff_plain;h=17b91f7451dea9774630879435146b30c57102b0;p=lhc%2Fweb%2Fwiklou.git Error message tweaks --- diff --git a/includes/PackageRepository.php b/includes/PackageRepository.php index e05235cf3b..a92c10649b 100644 --- a/includes/PackageRepository.php +++ b/includes/PackageRepository.php @@ -99,6 +99,17 @@ abstract class PackageRepository { */ 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 diff --git a/includes/installer/Installer.i18n.php b/includes/installer/Installer.i18n.php index 29f782836c..9b4670a700 100644 --- a/includes/installer/Installer.i18n.php +++ b/includes/installer/Installer.i18n.php @@ -77,8 +77,7 @@ You cannot install MediaWiki.', '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]', diff --git a/includes/installer/Installer.php b/includes/installer/Installer.php index 3d82dddc60..6f63ecc040 100644 --- a/includes/installer/Installer.php +++ b/includes/installer/Installer.php @@ -385,25 +385,19 @@ abstract class Installer { $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' ); @@ -438,6 +432,7 @@ abstract class Installer { 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; }