1
0
Fork 0

Move Config::get() to DI::config()->get()

This commit is contained in:
Philipp Holzer 2020-01-19 21:21:13 +01:00
commit 6c36fd9e01
No known key found for this signature in database
GPG key ID: D8365C3D36B77D90
126 changed files with 581 additions and 596 deletions

View file

@ -23,7 +23,7 @@ function theme_content(App $a)
$style = DI::pConfig()->get(local_user(), 'vier', 'style');
if ($style == "") {
$style = Config::get('vier', 'style');
$style = DI::config()->get('vier', 'style');
}
if ($style == "") {
@ -64,9 +64,9 @@ function theme_admin(App $a) {
if (!function_exists('get_vier_config'))
return;
$style = Config::get('vier', 'style');
$style = DI::config()->get('vier', 'style');
$helperlist = Config::get('vier', 'helperlist');
$helperlist = DI::config()->get('vier', 'helperlist');
if ($helperlist == "")
$helperlist = "https://forum.friendi.ca/profile/helpers";

View file

@ -11,7 +11,7 @@ $uid = $_REQUEST['puid'] ?? 0;
$style = DI::pConfig()->get($uid, 'vier', 'style');
if (empty($style)) {
$style = Config::get('vier', 'style');
$style = DI::config()->get('vier', 'style');
}
if (empty($style)) {

View file

@ -95,7 +95,7 @@ function get_vier_config($key, $default = false, $admin = false)
}
}
$result = Config::get("vier", $key);
$result = DI::config()->get("vier", $key);
if (!is_null($result)) {
return $result;
}
@ -141,7 +141,7 @@ function vier_community_info()
// last 9 users
if ($show_lastusers) {
$publish = (Config::get('system', 'publish_all') ? '' : " AND `publish` = 1 ");
$publish = (DI::config()->get('system', 'publish_all') ? '' : " AND `publish` = 1 ");
$order = " ORDER BY `register_date` DESC ";
$tpl = Renderer::getMarkupTemplate('ch_directory_item.tpl');
@ -240,7 +240,7 @@ function vier_community_info()
if ($show_helpers) {
$r = [];
$helperlist = Config::get("vier", "helperlist");
$helperlist = DI::config()->get("vier", "helperlist");
$helpers = explode(",", $helperlist);
@ -338,7 +338,7 @@ function vier_community_info()
$r[] = ["photo" => "images/wordpress.png", "name" => "Wordpress"];
}
if (function_exists("imap_open") && !Config::get("system", "imap_disabled") && !Config::get("system", "dfrn_only")) {
if (function_exists("imap_open") && !DI::config()->get("system", "imap_disabled") && !DI::config()->get("system", "dfrn_only")) {
$r[] = ["photo" => "images/mail.png", "name" => "E-Mail"];
}