]> git.mxchange.org Git - friendica.git/blobdiff - include/auth_ejabberd.php
Changed documentation
[friendica.git] / include / auth_ejabberd.php
index 01e3389427cf69ef4d8e48ba23dc05a06bdde529..9211c5baf091b782119b5da50382ad3e8f7a16b6 100755 (executable)
@@ -32,6 +32,8 @@
  *
  */
 
+use Friendica\App;
+
 if (sizeof($_SERVER["argv"]) == 0)
        die();
 
@@ -47,8 +49,9 @@ require_once("boot.php");
 
 global $a, $db;
 
-if (is_null($a))
-       $a = new App;
+if (is_null($a)) {
+       $a = new App(dirname(__DIR__));
+}
 
 if (is_null($db)) {
        @include(".htconfig.php");
@@ -146,7 +149,7 @@ class exAuth {
         * @param array $aCommand The command array
         */
        private function isuser($aCommand) {
-               global $a;
+               $a = get_app();
 
                // Check if there is a username
                if (!isset($aCommand[1])) {
@@ -219,7 +222,7 @@ class exAuth {
         * @param array $aCommand The command array
         */
        private function auth($aCommand) {
-               global $a;
+               $a = get_app();
 
                // check user authentication
                if (sizeof($aCommand) != 4) {
@@ -332,4 +335,3 @@ class exAuth {
                        fclose($this->rLogFile);
        }
 }
-?>