X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=bin%2Fauth_ejabberd.php;h=bf6d069d12bb58f1507f9d9ee6e0c14763c6e08e;hb=73835118550f4bf9c0df510283c905f89224d612;hp=06d8488df84d82d64813deb2037b247bf5a0d2e1;hpb=f7190ce9714be3e2edbc0915c854fc707cfbbcc6;p=friendica.git diff --git a/bin/auth_ejabberd.php b/bin/auth_ejabberd.php index 06d8488df8..bf6d069d12 100755 --- a/bin/auth_ejabberd.php +++ b/bin/auth_ejabberd.php @@ -32,9 +32,7 @@ * */ -use Friendica\App; -use Friendica\BaseObject; -use Friendica\Core\Config; +use Friendica\Factory; use Friendica\Util\ExAuth; if (sizeof($_SERVER["argv"]) == 0) { @@ -51,16 +49,11 @@ $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__)); -BaseObject::setApp($a); +$a = Factory\DependencyFactory::setUp('auth_ejabbered', dirname(__DIR__)); -@include ".htconfig.php"; -dba::connect($db_host, $db_user, $db_pass, $db_data); -unset($db_host, $db_user, $db_pass, $db_data); - -$oAuth = new ExAuth(); - -$oAuth->readStdin(); +if ($a->getMode()->isNormal()) { + $oAuth = new ExAuth(); + $oAuth->readStdin(); +}