]> git.mxchange.org Git - friendica.git/commitdiff
Use AddonHelper in Cron worker and addon console command
authorArt4 <art4@wlabs.de>
Tue, 4 Feb 2025 12:39:54 +0000 (12:39 +0000)
committerArt4 <art4@wlabs.de>
Tue, 4 Feb 2025 12:39:54 +0000 (12:39 +0000)
src/Console/Addon.php
src/Worker/Cron.php

index 277d4356f2a689031e0b3600343ef468cbfdb8cc..60c1751b3f83046197994cb85663122646c24056 100644 (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;
        }
index 3438b9e55a084cc5b845f8e141bf318696304b55..b576f09ae78003107456f5b768a80386aba7184b 100644 (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());
                }