mirror of
https://github.com/friendica/friendica
synced 2025-01-19 17:39:46 +00:00
Merge pull request #14687 from Art4/fix-console-addon-list
Fix list enabled/disabled addons
This commit is contained in:
commit
5de04f965a
1 changed files with 20 additions and 19 deletions
|
@ -121,27 +121,28 @@ HELP;
|
||||||
$this->out($this->getHelp());
|
$this->out($this->getHelp());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach (AddonCore::getAvailableList() as $addon) {
|
foreach (AddonCore::getAvailableList() as $addon) {
|
||||||
$addon_name = $addon[0];
|
$addon_name = $addon[0];
|
||||||
$enabled = AddonCore::isEnabled($addon_name) ? "enabled" : "disabled";
|
$enabled = AddonCore::isEnabled($addon_name);
|
||||||
switch ($subCmd) {
|
|
||||||
case 'all':
|
if ($subCmd === 'all') {
|
||||||
$table->addRow([$addon_name, $enabled]);
|
$table->addRow([$addon_name, $enabled ? 'enabled' : 'disabled']);
|
||||||
break;
|
|
||||||
case 'enabled':
|
continue;
|
||||||
if (!$enabled) {
|
|
||||||
continue 2;
|
|
||||||
}
|
|
||||||
$table->addRow([$addon_name]);
|
|
||||||
case 'disabled':
|
|
||||||
if ($enabled) {
|
|
||||||
continue 2;
|
|
||||||
}
|
|
||||||
$table->addRow([$addon_name]);
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($subCmd === 'enabled' && $enabled === true) {
|
||||||
|
$table->addRow([$addon_name]);
|
||||||
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($subCmd === 'disabled' && $enabled === false) {
|
||||||
|
$table->addRow([$addon_name]);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$this->out($table->getTable());
|
$this->out($table->getTable());
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
Loading…
Add table
Reference in a new issue