X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=bin%2Fauth_ejabberd.php;h=206e484470058bff0aa98c3625f2f47b4f29e0e4;hb=591ba9c68e82491468f7e97c966b2e5e3c0eefd6;hp=1f03b94af90017fb164221b2d6eab38a5d391aa9;hpb=4ae37c61966a7f4c055369ee8fd0d4bc20808fdb;p=friendica.git diff --git a/bin/auth_ejabberd.php b/bin/auth_ejabberd.php index 1f03b94af9..206e484470 100755 --- a/bin/auth_ejabberd.php +++ b/bin/auth_ejabberd.php @@ -32,7 +32,9 @@ * */ -use Friendica\App; +use Dice\Dice; +use Friendica\App\Mode; +use Friendica\BaseObject; use Friendica\Util\ExAuth; if (sizeof($_SERVER["argv"]) == 0) { @@ -49,12 +51,14 @@ $directory = realpath($directory . DIRECTORY_SEPARATOR . ".."); chdir($directory); -require_once "boot.php"; -require_once "include/dba.php"; +require dirname(__DIR__) . '/vendor/autoload.php'; -$a = new App(dirname(__DIR__)); +$dice = (new Dice())->addRules(include __DIR__ . '/../static/dependencies.config.php'); +BaseObject::setDependencyInjection($dice); -if ($a->getMode()->isNormal()) { +$appMode = $dice->create(Mode::class); + +if ($appMode->isNormal()) { $oAuth = new ExAuth(); $oAuth->readStdin(); }