From: Hypolite Petovan Date: Wed, 7 Mar 2018 17:35:16 +0000 (-0500) Subject: Ensure Config::load() in scripts X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=7e765199e84809d9aaf771df4828fe677579bdcd;p=friendica.git Ensure Config::load() in scripts --- diff --git a/scripts/auth_ejabberd.php b/scripts/auth_ejabberd.php index 3acd0590ec..5ca4f58516 100755 --- a/scripts/auth_ejabberd.php +++ b/scripts/auth_ejabberd.php @@ -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(); diff --git a/scripts/dbstructure.php b/scripts/dbstructure.php index ff5b53c622..ae9ab46f89 100755 --- a/scripts/dbstructure.php +++ b/scripts/dbstructure.php @@ -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": diff --git a/util/typo.php b/util/typo.php index 6a51880390..fba761e819 100755 --- a/util/typo.php +++ b/util/typo.php @@ -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');