X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=bin%2Fauth_ejabberd.php;h=3a95532464a7f2e70a60b09c8b35fc5274d4bfc6;hb=63c8a908804bb019898732af972d04f286eec041;hp=ecff7218dd7600063f6d80200b47303f18f7873b;hpb=6aa1dcfad371f34fea1f8e39b73de2cc3dd05784;p=friendica.git diff --git a/bin/auth_ejabberd.php b/bin/auth_ejabberd.php index ecff7218dd..3a95532464 100755 --- a/bin/auth_ejabberd.php +++ b/bin/auth_ejabberd.php @@ -58,6 +58,7 @@ if (php_sapi_name() !== 'cli') { use Dice\Dice; use Friendica\App\Mode; +use Friendica\Core\Logger\Capability\LogChannel; use Friendica\Security\ExAuth; use Psr\Log\LoggerInterface; @@ -78,10 +79,17 @@ chdir($directory); require dirname(__DIR__) . '/vendor/autoload.php'; $dice = (new Dice())->addRules(include __DIR__ . '/../static/dependencies.config.php'); -$dice = $dice->addRule(LoggerInterface::class,['constructParams' => ['auth_ejabberd']]); +/** @var \Friendica\Core\Addon\Capability\ICanLoadAddons $addonLoader */ +$addonLoader = $dice->create(\Friendica\Core\Addon\Capability\ICanLoadAddons::class); +$dice = $dice->addRules($addonLoader->getActiveAddonConfig('dependencies')); +$dice = $dice->addRule(LoggerInterface::class,['constructParams' => [LogChannel::AUTH_JABBERED]]); \Friendica\DI::init($dice); \Friendica\Core\Logger\Handler\ErrorHandler::register($dice->create(\Psr\Log\LoggerInterface::class)); + +// Check the database structure and possibly fixes it +\Friendica\Core\Update::check(\Friendica\DI::basePath(), true); + $appMode = $dice->create(Mode::class); if ($appMode->isNormal()) {