X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=testdrive%2Ftestdrive.php;h=d9bc0b3b4378684cd576b0c82d4cdf282753fcbf;hb=39c654da00e63a58b6a930e7d0e555bfb248b44b;hp=903f80b11d6ebf287fc91c17208583cd65d38228;hpb=2fc7356cf43a52ac91fa451f0e8a49f83bccf6df;p=friendica-addons.git diff --git a/testdrive/testdrive.php b/testdrive/testdrive.php index 903f80b1..d9bc0b3b 100644 --- a/testdrive/testdrive.php +++ b/testdrive/testdrive.php @@ -13,7 +13,7 @@ use Friendica\Database\DBA; use Friendica\DI; use Friendica\Model\Notification; use Friendica\Model\User; -use Friendica\Core\Config\Util\ConfigFileLoader; +use Friendica\Core\Config\Util\ConfigFileManager; use Friendica\Util\DateTimeFormat; function testdrive_install() @@ -25,17 +25,17 @@ function testdrive_install() Hook::register('globaldir_update','addon/testdrive/testdrive.php', 'testdrive_globaldir_update'); } -function testdrive_load_config(App $a, ConfigFileLoader $loader) +function testdrive_load_config(ConfigFileManager $loader) { - $a->getConfigCache()->load($loader->loadAddonConfig('testdrive'), \Friendica\Core\Config\ValueObject\Cache::SOURCE_STATIC); + DI::app()->getConfigCache()->load($loader->loadAddonConfig('testdrive'), \Friendica\Core\Config\ValueObject\Cache::SOURCE_STATIC); } -function testdrive_globaldir_update(App $a, array &$b) +function testdrive_globaldir_update(array &$b) { $b['url'] = ''; } -function testdrive_register_account(App $a, $b) +function testdrive_register_account($b) { $uid = $b; @@ -48,7 +48,7 @@ function testdrive_register_account(App $a, $b) } -function testdrive_cron(App $a, $b) +function testdrive_cron($b) { $users = DBA::selectToArray('user', [], ["`account_expires_on` < ? AND `expire_notification_sent` <= ?", DateTimeFormat::utc('now + 5 days'), DBA::NULL_DATETIME]); @@ -72,7 +72,7 @@ function testdrive_cron(App $a, $b) } } -function testdrive_enotify(App $a, array &$b) +function testdrive_enotify(array &$b) { if (!empty($b['params']) && $b['params']['type'] == Notification\Type::SYSTEM && !empty($b['params']['system_type']) && $b['params']['system_type'] === 'testdrive_expire') {