Browse Source

Ensure Config::load() in scripts

tags/2018.05
Hypolite Petovan 1 year ago
parent
commit
7e765199e8
3 changed files with 8 additions and 5 deletions
  1. 3
    0
      scripts/auth_ejabberd.php
  2. 2
    0
      scripts/dbstructure.php
  3. 3
    5
      util/typo.php

+ 3
- 0
scripts/auth_ejabberd.php View File

@@ -34,6 +34,7 @@
34 34
 
35 35
 use Friendica\App;
36 36
 use Friendica\BaseObject;
37
+use Friendica\Core\Config;
37 38
 use Friendica\Util\ExAuth;
38 39
 
39 40
 if (sizeof($_SERVER["argv"]) == 0) {
@@ -60,6 +61,8 @@ BaseObject::setApp($a);
60 61
 dba::connect($db_host, $db_user, $db_pass, $db_data);
61 62
 unset($db_host, $db_user, $db_pass, $db_data);
62 63
 
64
+Config::load();
65
+
63 66
 $oAuth = new ExAuth();
64 67
 
65 68
 $oAuth->readStdin();

+ 2
- 0
scripts/dbstructure.php View File

@@ -19,6 +19,8 @@ BaseObject::setApp($a);
19 19
 dba::connect($db_host, $db_user, $db_pass, $db_data);
20 20
 unset($db_host, $db_user, $db_pass, $db_data);
21 21
 
22
+Config::load();
23
+
22 24
 if ($_SERVER["argc"] == 2) {
23 25
 	switch ($_SERVER["argv"][1]) {
24 26
 		case "dryrun":

+ 3
- 5
util/typo.php View File

@@ -18,11 +18,9 @@ include 'boot.php';
18 18
 $a = new App(dirname(__DIR__));
19 19
 BaseObject::setApp($a);
20 20
 
21
-if (x($a->config, 'php_path')) {
22
-	$phpath = $a->config['php_path'];
23
-} else {
24
-	$phpath = 'php';
25
-}
21
+@include '.htconfig.php';
22
+
23
+$phpath = $a->getConfigValue('config', 'php_path', 'php');
26 24
 
27 25
 echo 'Directory: src' . PHP_EOL;
28 26
 $Iterator = new RecursiveDirectoryIterator('src');

Loading…
Cancel
Save