Ensure Config::load() in scripts
authorHypolite Petovan <mrpetovan@gmail.com>
Wed, 7 Mar 2018 17:35:16 +0000 (12:35 -0500)
committerHypolite Petovan <mrpetovan@gmail.com>
Wed, 7 Mar 2018 17:35:16 +0000 (12:35 -0500)
scripts/auth_ejabberd.php
scripts/dbstructure.php
util/typo.php

index 3acd059..5ca4f58 100755 (executable)
@@ -34,6 +34,7 @@
 
 use Friendica\App;
 use Friendica\BaseObject;
+use Friendica\Core\Config;
 use Friendica\Util\ExAuth;
 
 if (sizeof($_SERVER["argv"]) == 0) {
@@ -60,6 +61,8 @@ BaseObject::setApp($a);
 dba::connect($db_host, $db_user, $db_pass, $db_data);
 unset($db_host, $db_user, $db_pass, $db_data);
 
+Config::load();
+
 $oAuth = new ExAuth();
 
 $oAuth->readStdin();
index ff5b53c..ae9ab46 100755 (executable)
@@ -19,6 +19,8 @@ BaseObject::setApp($a);
 dba::connect($db_host, $db_user, $db_pass, $db_data);
 unset($db_host, $db_user, $db_pass, $db_data);
 
+Config::load();
+
 if ($_SERVER["argc"] == 2) {
        switch ($_SERVER["argv"][1]) {
                case "dryrun":
index 6a51880..fba761e 100755 (executable)
@@ -18,11 +18,9 @@ include 'boot.php';
 $a = new App(dirname(__DIR__));
 BaseObject::setApp($a);
 
-if (x($a->config, 'php_path')) {
-       $phpath = $a->config['php_path'];
-} else {
-       $phpath = 'php';
-}
+@include '.htconfig.php';
+
+$phpath = $a->getConfigValue('config', 'php_path', 'php');
 
 echo 'Directory: src' . PHP_EOL;
 $Iterator = new RecursiveDirectoryIterator('src');