]> git.mxchange.org Git - friendica.git/blobdiff - bin/auth_ejabberd.php
[frio] Fix help TOC display
[friendica.git] / bin / auth_ejabberd.php
index 10b9d874f1f1825b7a242c107728bd9d218df2ba..a6f30d20193275192d808dc5a9f9190d7d5f5e9e 100755 (executable)
@@ -33,8 +33,8 @@
  */
 
 use Friendica\App;
-use Friendica\Core\Config;
 use Friendica\Util\ExAuth;
+use Friendica\Util\LoggerFactory;
 
 if (sizeof($_SERVER["argv"]) == 0) {
        die();
@@ -50,15 +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__));
+$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();
\ No newline at end of file
+if ($a->getMode()->isNormal()) {
+       $oAuth = new ExAuth();
+       $oAuth->readStdin();
+}