}
// 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);
}
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/" );