mirror of
https://github.com/php/php-src.git
synced 2024-09-22 10:27:25 +00:00
Bug #25413 Add local installed packages to list-all
(thanks to Christian DickMann)
This commit is contained in:
parent
10961114ad
commit
349c8a5581
@ -188,6 +188,7 @@ parameter.
|
||||
'border' => true,
|
||||
'headline' => array('Package', 'Latest', 'Local'),
|
||||
);
|
||||
$local_pkgs = $reg->listPackages();
|
||||
|
||||
foreach ($available as $name => $info) {
|
||||
$installed = $reg->packageInfo($name);
|
||||
@ -205,8 +206,12 @@ parameter.
|
||||
&& (!isset($installed['version']) || $installed['version'] == $info['stable']))
|
||||
{
|
||||
continue;
|
||||
};
|
||||
};
|
||||
}
|
||||
}
|
||||
$pos = array_search(strtolower($name), $local_pkgs);
|
||||
if ($pos !== false) {
|
||||
unset($local_pkgs[$pos]);
|
||||
}
|
||||
|
||||
$data['data'][$info['category']][] = array(
|
||||
$name,
|
||||
@ -216,6 +221,18 @@ parameter.
|
||||
@$info['deps'],
|
||||
);
|
||||
}
|
||||
|
||||
foreach ($local_pkgs as $name) {
|
||||
$info = $reg->packageInfo($name);
|
||||
$data['data']['Local'][] = array(
|
||||
$info['package'],
|
||||
'',
|
||||
$info['version'],
|
||||
$info['summary'],
|
||||
@$info['release_deps']
|
||||
);
|
||||
}
|
||||
|
||||
$this->ui->outputData($data, $command);
|
||||
return true;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user