Skip to content

Commit

Permalink
Update core/Command/App/ListApps.php
Browse files Browse the repository at this point in the history
Thanks for the suggestion. I agree that your suggestion is less complicated.

Co-authored-by: Côme Chilliet <[email protected]>
Signed-off-by: Adam Blakey <[email protected]>
  • Loading branch information
adam-blakey and come-nc authored Mar 18, 2024
1 parent 8201a93 commit cf8451b
Showing 1 changed file with 2 additions and 16 deletions.
18 changes: 2 additions & 16 deletions core/Command/App/ListApps.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [];
Expand Down

0 comments on commit cf8451b

Please sign in to comment.