Use AddonHelper in Cron worker and addon console command

This commit is contained in:
Art4 2025-02-04 12:39:54 +00:00
parent 31f62b807a
commit 5497fd3559
2 changed files with 3 additions and 4 deletions

View file

@ -170,7 +170,7 @@ HELP;
throw new RuntimeException($this->l10n->t('Addon already enabled'));
}
AddonCore::install($addon);
$this->addonHelper->installAddon($addon);
return 0;
}
@ -194,7 +194,7 @@ HELP;
throw new RuntimeException($this->l10n->t('Addon already disabled'));
}
AddonCore::uninstall($addon);
$this->addonHelper->uninstallAddon($addon);
return 0;
}

View file

@ -7,7 +7,6 @@
namespace Friendica\Worker;
use Friendica\Core\Addon;
use Friendica\Core\Hook;
use Friendica\Core\Worker;
use Friendica\Database\DBA;
@ -145,7 +144,7 @@ class Cron
// Update "blocked" status of servers
Worker::add(Worker::PRIORITY_LOW, 'UpdateBlockedServers');
Addon::reload();
DI::addonHelper()->reloadAddons();
DI::keyValue()->set('last_cron_daily', time());
}