1
0
Fork 0

Merge pull request #414 from hason/show

Show command - sort versions before print
pull/415/merge
Jordi Boggiano 2012-03-09 00:25:11 -08:00
commit 5ac8ffd287
1 changed files with 5 additions and 3 deletions

View File

@ -165,10 +165,12 @@ EOT
$versions = array(); $versions = array();
foreach ($repos->findPackages($package->getName()) as $version) { foreach ($repos->findPackages($package->getName()) as $version) {
$versions[$version->getPrettyVersion()] = true; $versions[$version->getPrettyVersion()] = $version->getVersion();
} }
$versions = join(', ', array_keys($versions)); uasort($versions, 'version_compare');
$versions = join(', ', array_keys(array_reverse($versions)));
// highlight installed version // highlight installed version
if ($installedRepo->hasPackage($package)) { if ($installedRepo->hasPackage($package)) {