Replace direct accesses to App->config by Config::get/set calls

This commit is contained in:
Hypolite Petovan 2018-07-07 17:46:30 -04:00
parent d1f2d04803
commit 762a786611
29 changed files with 180 additions and 190 deletions

View file

@ -36,7 +36,7 @@ function home_content(App $a) {
}
$customhome = false;
$defaultheader = '<h1>'.((x($a->config,'sitename')) ? L10n::t("Welcome to %s", $a->config['sitename']) : "").'</h1>';
$defaultheader = '<h1>' . (Config::get('config', 'sitename') ? L10n::t('Welcome to %s', Config::get('config', 'sitename')) : '') . '</h1>';
$homefilepath = $a->basepath . "/home.html";
$cssfilepath = $a->basepath . "/home.css";
@ -45,9 +45,9 @@ function home_content(App $a) {
if (file_exists($cssfilepath)) {
$a->page['htmlhead'] .= '<link rel="stylesheet" type="text/css" href="'.System::baseUrl().'/home.css'.'" media="all" />';
}
}
}
$login = Login::form($a->query_string, $a->config['register_policy'] == REGISTER_CLOSED ? 0 : 1);
$login = Login::form($a->query_string, Config::get('config', 'register_policy') === REGISTER_CLOSED ? 0 : 1);
$content = '';
Addon::callHooks("home_content",$content);