diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2015-04-21 10:26:16 +0200 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2015-04-21 10:26:16 +0200 |
commit | edbcb834c7f720ebc30b4aa64c7095d8e786dedc (patch) | |
tree | 7419c28475be7afa0dee090f2619ba5712fe0f5e | |
parent | c548066d2cc22c95f27baaae848bc6a13d3a65c2 (diff) | |
parent | 2c396a708069bc4080a8c5273a69dbdfdaf0170e (diff) | |
download | nextcloud-server-edbcb834c7f720ebc30b4aa64c7095d8e786dedc.tar.gz nextcloud-server-edbcb834c7f720ebc30b4aa64c7095d8e786dedc.zip |
Merge pull request #15753 from owncloud/remove-app-version-from-disabled-list
Remove the app version from disabled app list
-rw-r--r-- | core/command/app/listapps.php | 4 | ||||
-rw-r--r-- | core/command/base.php | 23 | ||||
-rw-r--r-- | core/command/status.php | 2 |
3 files changed, 25 insertions, 4 deletions
diff --git a/core/command/app/listapps.php b/core/command/app/listapps.php index 37a1d645ed4..e30baddb745 100644 --- a/core/command/app/listapps.php +++ b/core/command/app/listapps.php @@ -55,12 +55,12 @@ class ListApps extends Base { sort($enabledApps); foreach ($enabledApps as $app) { - $apps['enabled'][$app] = (isset($versions[$app])) ? $versions[$app] : ''; + $apps['enabled'][$app] = (isset($versions[$app])) ? $versions[$app] : true; } sort($disabledApps); foreach ($disabledApps as $app) { - $apps['disabled'][$app] = (isset($versions[$app])) ? $versions[$app] : ''; + $apps['disabled'][$app] = null; } $this->writeAppList($input, $output, $apps); diff --git a/core/command/base.php b/core/command/base.php index c2d5cf97f02..f84dcb1aeaf 100644 --- a/core/command/base.php +++ b/core/command/base.php @@ -54,9 +54,30 @@ class Base extends Command { break; default: foreach ($items as $key => $item) { - $output->writeln(' - ' . (!is_int($key) ? $key . ': ' : '') . $item); + if (!is_int($key)) { + $value = $this->valueToString($item); + if (!is_null($value)) { + $output->writeln(' - ' . $key . ': ' . $value); + } else { + $output->writeln(' - ' . $key); + } + } else { + $output->writeln(' - ' . $this->valueToString($item)); + } } break; } } + + protected function valueToString($value) { + if ($value === false) { + return 'false'; + } else if ($value === true) { + return 'true'; + } else if ($value === null) { + null; + } else { + return $value; + } + } } diff --git a/core/command/status.php b/core/command/status.php index 3859f69febc..737113d4f85 100644 --- a/core/command/status.php +++ b/core/command/status.php @@ -37,7 +37,7 @@ class Status extends Base { protected function execute(InputInterface $input, OutputInterface $output) { $values = array( - 'installed' => \OC_Config::getValue('installed') ? 'true' : 'false', + 'installed' => (bool) \OC_Config::getValue('installed'), 'version' => implode('.', \OC_Util::getVersion()), 'versionstring' => \OC_Util::getVersionString(), 'edition' => \OC_Util::getEditionString(), |