mirror of
https://git.friendi.ca/friendica/friendica-addons.git
synced 2025-06-07 09:54:27 +02:00
Move Config::get() to DI::config()->get()
This commit is contained in:
parent
c67ad31c8b
commit
1ce63185ab
38 changed files with 342 additions and 342 deletions
|
@ -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/" );
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue