diff --git a/core/Command/App/ListApps.php b/core/Command/App/ListApps.php index a361ac6b19e1c..07fc340d59720 100644 --- a/core/Command/App/ListApps.php +++ b/core/Command/App/ListApps.php @@ -74,22 +74,8 @@ protected function execute(InputInterface $input, OutputInterface $output): int $shippedFilter = null; } - if ($input->getOption('enabled') && $input->getOption('disabled')) { - $showEnabledApps = true; - $showDisabledApps = true; - } - else if ($input->getOption('enabled')) { - $showEnabledApps = true; - $showDisabledApps = false; - } - else if ($input->getOption('disabled')) { - $showEnabledApps = false; - $showDisabledApps = true; - } - else { - $showEnabledApps = true; - $showDisabledApps = true; - } + $showEnabledApps = $input->getOption('enabled') || !$input->getOption('disabled'); + $showDisabledApps = $input->getOption('disabled') || !$input->getOption('enabled'); $apps = \OC_App::getAllApps(); $enabledApps = $disabledApps = [];