From 7e765199e84809d9aaf771df4828fe677579bdcd Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Wed, 7 Mar 2018 12:35:16 -0500 Subject: [PATCH] Ensure Config::load() in scripts --- scripts/auth_ejabberd.php | 3 +++ scripts/dbstructure.php | 2 ++ util/typo.php | 8 +++----- 3 files changed, 8 insertions(+), 5 deletions(-) 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'); -- 2.39.5