X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=bin%2Fauth_ejabberd.php;h=a6f30d20193275192d808dc5a9f9190d7d5f5e9e;hb=21f9d8fcc9ad3db40a33cdd9a46cd6328824ef2a;hp=06d8488df84d82d64813deb2037b247bf5a0d2e1;hpb=78114c13d5ce27b36682a960859056d4ebf9d9be;p=friendica.git diff --git a/bin/auth_ejabberd.php b/bin/auth_ejabberd.php index 06d8488df8..a6f30d2019 100755 --- a/bin/auth_ejabberd.php +++ b/bin/auth_ejabberd.php @@ -33,9 +33,8 @@ */ use Friendica\App; -use Friendica\BaseObject; -use Friendica\Core\Config; use Friendica\Util\ExAuth; +use Friendica\Util\LoggerFactory; if (sizeof($_SERVER["argv"]) == 0) { die(); @@ -51,16 +50,13 @@ $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); +$logger = LoggerFactory::create('auth_ejabberd'); -@include ".htconfig.php"; -dba::connect($db_host, $db_user, $db_pass, $db_data); -unset($db_host, $db_user, $db_pass, $db_data); +$a = new App(dirname(__DIR__), $logger); -$oAuth = new ExAuth(); - -$oAuth->readStdin(); +if ($a->getMode()->isNormal()) { + $oAuth = new ExAuth(); + $oAuth->readStdin(); +}