[BUGFIX] EM installs outdated versions of depending extensions
authorSteffen Gebert <steffen.gebert@typo3.org>
Wed, 5 Oct 2011 20:11:13 +0000 (22:11 +0200)
committerXavier Perseguers <xavier@typo3.org>
Thu, 6 Oct 2011 13:52:32 +0000 (15:52 +0200)
When installing an extension with a dependency to another extension,
which is not available on the server, EM retrieves it from TER. However,
by mistake it always retrieves the oldest version, not the newest.

Change-Id: I5b630ddc744670c48fc5d86856ca6ae46806fcf6
Resolves: #29243
Releases: 4.6, 4.5
Reviewed-on: http://review.typo3.org/5598
Reviewed-by: Xavier Perseguers
Tested-by: Xavier Perseguers
typo3/sysext/em/classes/index.php

index b3b917d..11e028d 100644 (file)
@@ -1451,6 +1451,8 @@ class SC_mod_tools_em_index extends t3lib_SCbase {
                        // Fetch extension from TER:
                        if (!strlen($version)) {
                                $versions = array_keys($this->xmlHandler->extensionsXML[$extKey]['versions']);
+                                       // sort version numbers ascending to pick the highest version
+                               natsort($versions);
                                $version = end($versions);
                        }
                        $fetchData = $this->terConnection->fetchExtension($extKey, $version, $this->xmlHandler->extensionsXML[$extKey]['versions'][$version]['t3xfilemd5'], $this->getMirrorURL());
@@ -2597,4 +2599,4 @@ $SOBE->checkExtObj();
 $SOBE->main();
 $SOBE->printContent();
 
-?>
\ No newline at end of file
+?>