Ver código fonte

Ensure Config::load() in scripts

tags/2018.05
Hypolite Petovan 2 anos atrás
pai
commit
7e765199e8
3 arquivos alterados com 8 adições e 5 exclusões
  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 Ver arquivo

@@ -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();

+ 2
- 0
scripts/dbstructure.php Ver arquivo

@@ -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":


+ 3
- 5
util/typo.php Ver arquivo

@@ -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');


Carregando…
Cancelar
Salvar