]> git.mxchange.org Git - friendica-addons.git/blobdiff - blackout/blackout.php
Move Config::get() to DI::config()->get()
[friendica-addons.git] / blackout / blackout.php
index 09fa06934f6efeac4e22fa36a5ef339b92bdbfd5..aee5acc76ed7d197d10ee6c9e068f89ca719ca31 100644 (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/" );