X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=include%2Fauth_ejabberd.php;h=490ea0d1cb8e44982100690be9a92d229d456abb;hb=0babc2c96ec398d1bbfa7bb82916892dc5d7fe91;hp=01e3389427cf69ef4d8e48ba23dc05a06bdde529;hpb=75711a947e9af36d6f03d2089b7f68ee6d92fec2;p=friendica.git diff --git a/include/auth_ejabberd.php b/include/auth_ejabberd.php index 01e3389427..490ea0d1cb 100755 --- a/include/auth_ejabberd.php +++ b/include/auth_ejabberd.php @@ -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"); @@ -86,7 +89,7 @@ class exAuth { // Open the logfile if the logfile name is defined if ($this->sLogFile != '') - $this->rLogFile = fopen($this->sLogFile, "a") or die("Error opening log file: ". $this->sLogFile); + $this->rLogFile = fopen($this->sLogFile, "a") || die("Error opening log file: ". $this->sLogFile); $this->writeLog("[exAuth] start"); @@ -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); } } -?>