summaryrefslogtreecommitdiffstats
path: root/core/command
diff options
context:
space:
mode:
authorJoas Schilling <nickvergessen@owncloud.com>2015-04-20 16:31:43 +0200
committerJoas Schilling <nickvergessen@owncloud.com>2015-04-20 17:03:19 +0200
commit2c396a708069bc4080a8c5273a69dbdfdaf0170e (patch)
tree54bb86376008c563866a9a1eea0fc5f713c35bba /core/command
parentce2c8533d9819e1ec9272bcdc06dcf4fa6b0678c (diff)
downloadnextcloud-server-2c396a708069bc4080a8c5273a69dbdfdaf0170e.tar.gz
nextcloud-server-2c396a708069bc4080a8c5273a69dbdfdaf0170e.zip
Remove the app version from disabled app list
Diffstat (limited to 'core/command')
-rw-r--r--core/command/app/listapps.php4
-rw-r--r--core/command/base.php23
-rw-r--r--core/command/status.php2
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(),