]> git.mxchange.org Git - friendica.git/blobdiff - bin/auth_ejabberd.php
Merge pull request #8141 from annando/brief2
[friendica.git] / bin / auth_ejabberd.php
index 1f7ddefc610c5092136619b78b2d03c643d8d02f..13dc6eeba0004d5b99b05a36807a7a4febdf1e8e 100755 (executable)
  *
  */
 
+use Dice\Dice;
+use Friendica\App\Mode;
 use Friendica\Util\ExAuth;
+use Psr\Log\LoggerInterface;
 
 if (sizeof($_SERVER["argv"]) == 0) {
        die();
@@ -50,10 +53,12 @@ chdir($directory);
 
 require dirname(__DIR__) . '/vendor/autoload.php';
 
-$dice = new \Dice\Dice();
-$dice = $dice->addRules(include __DIR__ . '/../static/dependencies.config.php');
+$dice = (new Dice())->addRules(include __DIR__ . '/../static/dependencies.config.php');
+$dice = $dice->addRule(LoggerInterface::class,['constructParams' => ['auth_ejabberd']]);
 
-$appMode = $dice->create(\Friendica\App\Mode::class);
+\Friendica\DI::init($dice);
+
+$appMode = $dice->create(Mode::class);
 
 if ($appMode->isNormal()) {
        $oAuth = new ExAuth();