Browse Source

Some small changes

tags/3.6
Michael 1 year ago
parent
commit
7341c3bad5
1 changed files with 6 additions and 9 deletions
  1. 6
    9
      scripts/auth_ejabberd.php

+ 6
- 9
scripts/auth_ejabberd.php View File

@@ -13,14 +13,14 @@
13 13
  * Installation:
14 14
  *
15 15
  *	- Change it's owner to whichever user is running the server, ie. ejabberd
16
- *	  $ chown ejabberd:ejabberd /path/to/friendica/include/auth_ejabberd.php
16
+ *	  $ chown ejabberd:ejabberd /path/to/friendica/scripts/auth_ejabberd.php
17 17
  *
18 18
  * 	- Change the access mode so it is readable only to the user ejabberd and has exec
19
- *	  $ chmod 700 /path/to/friendica/include/auth_ejabberd.php
19
+ *	  $ chmod 700 /path/to/friendica/scripts/auth_ejabberd.php
20 20
  *
21 21
  *	- Edit your ejabberd.cfg file, comment out your auth_method and add:
22 22
  *	  {auth_method, external}.
23
- *	  {extauth_program, "/path/to/friendica/include/auth_ejabberd.php"}.
23
+ *	  {extauth_program, "/path/to/friendica/script/auth_ejabberd.php"}.
24 24
  *
25 25
  *	- Restart your ejabberd service, you should be able to login with your friendica auth info
26 26
  *
@@ -47,16 +47,13 @@ if (substr($directory, 0, 1) != "/")
47 47
 $directory = realpath($directory."/..");
48 48
 
49 49
 chdir($directory);
50
-require_once("boot.php");
51 50
 
52
-global $a;
51
+require_once "boot.php";
52
+require_once "include/dba.php";
53 53
 
54
-if (empty($a)) {
55
-	$a = new App(dirname(__DIR__));
56
-}
54
+$a = new App(dirname(__DIR__));
57 55
 
58 56
 @include(".htconfig.php");
59
-require_once("include/dba.php");
60 57
 dba::connect($db_host, $db_user, $db_pass, $db_data);
61 58
 unset($db_host, $db_user, $db_pass, $db_data);
62 59
 

Loading…
Cancel
Save