]> git.mxchange.org Git - friendica.git/blobdiff - bin/auth_ejabberd.php
Added test case for Router->getModuleClass
[friendica.git] / bin / auth_ejabberd.php
index 10b9d874f1f1825b7a242c107728bd9d218df2ba..bf6d069d12bb58f1507f9d9ee6e0c14763c6e08e 100755 (executable)
@@ -32,8 +32,7 @@
  *
  */
 
-use Friendica\App;
-use Friendica\Core\Config;
+use Friendica\Factory;
 use Friendica\Util\ExAuth;
 
 if (sizeof($_SERVER["argv"]) == 0) {
@@ -50,15 +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__));
+$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();
\ No newline at end of file
+if ($a->getMode()->isNormal()) {
+       $oAuth = new ExAuth();
+       $oAuth->readStdin();
+}