Move Config::get() to DI::config()->get()
This commit is contained in:
@@ -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/" );
|
||||
|
||||
|
||||
Reference in New Issue
Block a user