Always include the installed app version in "occ app:list"

This commit is contained in:
Joas Schilling 2015-03-03 10:26:09 +01:00
parent e271fa3ee8
commit 560137ca23
1 changed files with 3 additions and 2 deletions

View File

@ -23,6 +23,7 @@ class ListApps extends Command {
$apps = \OC_App::getAllApps(); $apps = \OC_App::getAllApps();
$enabledApps = array(); $enabledApps = array();
$disabledApps = array(); $disabledApps = array();
$versions = \OC_App::getAppVersions();
//sort enabled apps above disabled apps //sort enabled apps above disabled apps
foreach ($apps as $app) { foreach ($apps as $app) {
@ -37,11 +38,11 @@ class ListApps extends Command {
sort($disabledApps); sort($disabledApps);
$output->writeln('Enabled:'); $output->writeln('Enabled:');
foreach ($enabledApps as $app) { foreach ($enabledApps as $app) {
$output->writeln(' - ' . $app); $output->writeln(' - ' . $app . (isset($versions[$app]) ? ' (' . $versions[$app] . ')' : ''));
} }
$output->writeln('Disabled:'); $output->writeln('Disabled:');
foreach ($disabledApps as $app) { foreach ($disabledApps as $app) {
$output->writeln(' - ' . $app); $output->writeln(' - ' . $app . (isset($versions[$app]) ? ' (' . $versions[$app] . ')' : ''));
} }
} }
} }