*
*/
+use Friendica\App;
+
if (sizeof($_SERVER["argv"]) == 0)
die();
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");
// 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");
* @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])) {
* @param array $aCommand The command array
*/
private function auth($aCommand) {
- global $a;
+ $a = get_app();
// check user authentication
if (sizeof($aCommand) != 4) {
fclose($this->rLogFile);
}
}
-?>