r71128 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r71127‎ | r71128 | r71129 >
Date:16:42, 15 August 2010
Author:jeroendedauw
Status:reverted
Tags:
Comment:
Error message tweaks
Modified paths:
  • /trunk/phase3/includes/PackageRepository.php (modified) (history)
  • /trunk/phase3/includes/installer/Installer.i18n.php (modified) (history)
  • /trunk/phase3/includes/installer/Installer.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/PackageRepository.php
@@ -99,6 +99,17 @@
100100 */
101101 public function __construct( $location ) {
102102 $this->location = $location;
103 - }
 103+ }
 104+
 105+ /**
 106+ * Returns the repository location.
 107+ *
 108+ * @since 1.17
 109+ *
 110+ * @return string
 111+ */
 112+ public function getLocation() {
 113+ return $this->location;
 114+ }
104115
105116 }
\ No newline at end of file
Index: trunk/phase3/includes/installer/Installer.php
@@ -385,25 +385,19 @@
386386
387387 $repository = wfGetRepository();
388388 $currentVersion = $repository->getLatestCoreVersion();
389 -
390 - /*
391 - if( !$latestInfo ) {
392 - $this->showMessage( 'config-env-latest-can-not-check', $latestInfoUrl );
393 - return;
394 - }
395 - */
396389
397390 $this->setVar( '_ExternalHTTP', true );
398391
399392 if ( $currentVersion === false ) {
400393 # For when the request is successful but there's e.g. some silly man in
401394 # the middle firewall blocking us, e.g. one of those annoying airport ones
402 - $this->showMessage( 'config-env-latest-data-invalid', $latestInfoUrl );
 395+ $this->showMessage( 'config-env-latest-can-not-check', $repository->getLocation() );
403396 return;
404397 }
405398
406399 if( version_compare( $wgVersion, $currentVersion, '<' ) ) {
407400 $this->showMessage( 'config-env-latest-old' );
 401+ // FIXME: this only works for the web installer!
408402 $this->showHelpBox( 'config-env-latest-help', $wgVersion, $currentVersion );
409403 } elseif( version_compare( $wgVersion, $currentVersion, '>' ) ) {
410404 $this->showMessage( 'config-env-latest-new' );
@@ -438,6 +432,7 @@
439433
440434 if ( !$compiledDBs ) {
441435 $this->showMessage( 'config-no-db' );
 436+ // FIXME: this only works for the web installer!
442437 $this->showHelpBox( 'config-no-db-help', $wgLang->commaList( $allNames ) );
443438 return false;
444439 }
Index: trunk/phase3/includes/installer/Installer.i18n.php
@@ -77,8 +77,7 @@
7878 'config-env-php' => 'PHP $1 is installed.',
7979 'config-env-latest-ok' => 'You are installing the latest version of Mediawiki.',
8080 'config-env-latest-new' => "'''Note:''' You are installing a development version of Mediawiki.",
81 - 'config-env-latest-can-not-check' => "'''Note:''' The installer was unable to retrieve information about the latest MediaWiki release from [$1].",
82 - 'config-env-latest-data-invalid' => "'''Warning:''' When trying to check if this version was outdated invalid data was retrieved from [$1].",
 81+ 'config-env-latest-can-not-check' => "'''Warning:''' The installer was unable to retrieve information about the latest MediaWiki release from [$1].",
8382 'config-env-latest-old' => "'''Warning:''' You are installing an outdated version of Mediawiki.",
8483 'config-env-latest-help' => 'You are installing version $1, but the latest version is $2.
8584 You are advised to use the latest release, which can be downloaded from [http://www.mediawiki.org/wiki/Download mediawiki.org]',

Status & tagging log