mirror of
https://github.com/friendica/friendica
synced 2025-02-21 21:26:48 +00:00
Use AddonHelper in Cron worker and addon console command
This commit is contained in:
parent
31f62b807a
commit
5497fd3559
2 changed files with 3 additions and 4 deletions
|
@ -170,7 +170,7 @@ HELP;
|
||||||
throw new RuntimeException($this->l10n->t('Addon already enabled'));
|
throw new RuntimeException($this->l10n->t('Addon already enabled'));
|
||||||
}
|
}
|
||||||
|
|
||||||
AddonCore::install($addon);
|
$this->addonHelper->installAddon($addon);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -194,7 +194,7 @@ HELP;
|
||||||
throw new RuntimeException($this->l10n->t('Addon already disabled'));
|
throw new RuntimeException($this->l10n->t('Addon already disabled'));
|
||||||
}
|
}
|
||||||
|
|
||||||
AddonCore::uninstall($addon);
|
$this->addonHelper->uninstallAddon($addon);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,7 +7,6 @@
|
||||||
|
|
||||||
namespace Friendica\Worker;
|
namespace Friendica\Worker;
|
||||||
|
|
||||||
use Friendica\Core\Addon;
|
|
||||||
use Friendica\Core\Hook;
|
use Friendica\Core\Hook;
|
||||||
use Friendica\Core\Worker;
|
use Friendica\Core\Worker;
|
||||||
use Friendica\Database\DBA;
|
use Friendica\Database\DBA;
|
||||||
|
@ -145,7 +144,7 @@ class Cron
|
||||||
// Update "blocked" status of servers
|
// Update "blocked" status of servers
|
||||||
Worker::add(Worker::PRIORITY_LOW, 'UpdateBlockedServers');
|
Worker::add(Worker::PRIORITY_LOW, 'UpdateBlockedServers');
|
||||||
|
|
||||||
Addon::reload();
|
DI::addonHelper()->reloadAddons();
|
||||||
|
|
||||||
DI::keyValue()->set('last_cron_daily', time());
|
DI::keyValue()->set('last_cron_daily', time());
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue