Use Config helper (#10339)

remove usage of global variable
This commit is contained in:
Tony Murray
2019-06-23 00:29:12 -05:00
committed by GitHub
parent 342acf50f1
commit f3ba8947f7
367 changed files with 1589 additions and 1857 deletions

View File

@@ -19,8 +19,8 @@ $no_refresh = true;
$config_groups = get_config_by_group('alerting');
if (isset($config['base_url']) && filter_var($config['base_url'].'/'.$_SERVER['REQUEST_URI'], FILTER_VALIDATE_URL)) {
$callback = $config['base_url'].'/'.$_SERVER['REQUEST_URI'].'/';
if (Config::has('base_url') && filter_var(Config::get('base_url') . '/' . $_SERVER['REQUEST_URI'], FILTER_VALIDATE_URL)) {
$callback = Config::get('base_url') . '/' . $_SERVER['REQUEST_URI'] . '/';
} else {
$callback = get_url().'/';
}