Error message tweaks
authorJeroen De Dauw <jeroendedauw@users.mediawiki.org>
Sun, 15 Aug 2010 16:42:43 +0000 (16:42 +0000)
committerJeroen De Dauw <jeroendedauw@users.mediawiki.org>
Sun, 15 Aug 2010 16:42:43 +0000 (16:42 +0000)
includes/PackageRepository.php
includes/installer/Installer.i18n.php
includes/installer/Installer.php

index e05235c..a92c106 100644 (file)
@@ -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
index 29f7828..9b4670a 100644 (file)
@@ -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]',
index 3d82ddd..6f63ecc 100644 (file)
@@ -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;
                }