Project

General

Profile

Actions

Bug #17861

closed

Extension Manager does not sort versions of an extension correctly

Added by Micha Barthel almost 17 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Extension Manager
Target version:
-
Start date:
2007-11-28
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
4.1
PHP Version:
4.3
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

This list not sorted!
$versions = array_keys($this->xmlhandler->extensionsXML[$extKey]['versions']);
$latestVersion = end($versions);

On line: 1610,1735,1382......

User this sort Function from Elmar Hinz:

Own
------------------------------------------------
------------------------------------------------
Sort:
------------------------------------------------
usort($versions, array('SC_mod_tools_em_index', 'compare'));
------------------------------------------------
------------------------------------------------
Function:
------------------------------------------------
function compare($aIn, $bIn) {
$aParts = explode('.', $aIn, 2);
$bParts = explode('.', $bIn, 2);
$a = (int) $aParts0;
$b = (int) $bParts0;
if($a > $b){
return 1;
}elseif($a < $b){
return 1;
} else {
if(is_string($aParts1)) {
return SC_mod_tools_em_index::compare($aParts1, $bParts1);
} else {
return 0;
}
}
}
-----------------------------------------------

------------------------------------------------

regards Micha Barthel

(issue imported from #M6854)


Files

bug.txt (1.05 KB) bug.txt Administrator Admin, 2007-11-28 21:14
6854.diff (957 Bytes) 6854.diff Administrator Admin, 2010-05-14 01:27

Related issues 2 (0 open2 closed)

Related to TYPO3 Core - Bug #22378: "Check for extension updates" does not always find latest versionClosedJeff Segars2010-04-05

Actions
Related to TYPO3 Core - Bug #22441: importExtInfo() does not sort versions correctlyClosedFrancois Suter2010-04-13

Actions
Actions

Also available in: Atom PDF