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

This commit is contained in:
nupplaPhil 2020-01-19 21:21:12 +01:00
parent c67ad31c8b
commit 1ce63185ab
No known key found for this signature in database
GPG key ID: D8365C3D36B77D90
38 changed files with 342 additions and 342 deletions

View file

@ -65,9 +65,9 @@ function blackout_redirect ($a, $b) {
}
// else...
$mystart = Config::get('blackout','begindate');
$myend = Config::get('blackout','enddate');
$myurl = Config::get('blackout','url');
$mystart = DI::config()->get('blackout','begindate');
$myend = DI::config()->get('blackout','enddate');
$myurl = DI::config()->get('blackout','url');
$now = time();
$date1 = DateTime::createFromFormat('Y-m-d G:i', $mystart);
$date2 = DateTime::createFromFormat('Y-m-d G:i', $myend);
@ -85,11 +85,11 @@ function blackout_redirect ($a, $b) {
}
function blackout_addon_admin(&$a, &$o) {
$mystart = Config::get('blackout','begindate');
$mystart = DI::config()->get('blackout','begindate');
if (! is_string($mystart)) { $mystart = "YYYY-MM-DD hh:mm"; }
$myend = Config::get('blackout','enddate');
$myend = DI::config()->get('blackout','enddate');
if (! is_string($myend)) { $myend = "YYYY-MM-DD hh:mm"; }
$myurl = Config::get('blackout','url');
$myurl = DI::config()->get('blackout','url');
if (! is_string($myurl)) { $myurl = "https://www.example.com"; }
$t = Renderer::getMarkupTemplate( "admin.tpl", "addon/blackout/" );