Merge pull request #1077 from MrPetovan/bug/fatal-errors

[various] Fix Notification class paths
This commit is contained in:
Tobias Diekershoff 2021-02-04 09:59:21 +01:00 committed by GitHub
commit 6312178d6e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View File

@ -58,7 +58,7 @@ function public_server_cron($a, $b)
if (DBA::isResult($r)) { if (DBA::isResult($r)) {
foreach ($r as $rr) { foreach ($r as $rr) {
notification([ notification([
'type' => Notification/Type::SYSTEM, 'type' => Notification\Type::SYSTEM,
'uid' => $rr['uid'], 'uid' => $rr['uid'],
'system_type' => 'public_server_expire', 'system_type' => 'public_server_expire',
'source_name' => DI::l10n()->t('Administrator'), 'source_name' => DI::l10n()->t('Administrator'),
@ -112,7 +112,7 @@ function public_server_cron($a, $b)
function public_server_enotify(&$a, &$b) function public_server_enotify(&$a, &$b)
{ {
if (!empty($b['params']) && $b['params']['type'] == Type::SYSTEM if (!empty($b['params']) && $b['params']['type'] == Notification\Type::SYSTEM
&& !empty($b['params']['system_type']) && $b['params']['system_type'] === 'public_server_expire') { && !empty($b['params']['system_type']) && $b['params']['system_type'] === 'public_server_expire') {
$b['itemlink'] = DI::baseUrl()->get(); $b['itemlink'] = DI::baseUrl()->get();
$b['epreamble'] = $b['preamble'] = DI::l10n()->t('Your account on %s will expire in a few days.', DI::config()->get('system', 'sitename')); $b['epreamble'] = $b['preamble'] = DI::l10n()->t('Your account on %s will expire in a few days.', DI::config()->get('system', 'sitename'));

View File

@ -58,7 +58,7 @@ function testdrive_cron($a,$b) {
if(count($r)) { if(count($r)) {
foreach($r as $rr) { foreach($r as $rr) {
notification([ notification([
'type' => Notification/Type::SYSTEM, 'type' => Notification\Type::SYSTEM,
'uid' => $rr['uid'], 'uid' => $rr['uid'],
'system_type' => 'testdrive_expire', 'system_type' => 'testdrive_expire',
'source_name' => DI::l10n()->t('Administrator'), 'source_name' => DI::l10n()->t('Administrator'),
@ -83,7 +83,7 @@ function testdrive_cron($a,$b) {
} }
function testdrive_enotify(&$a, &$b) { function testdrive_enotify(&$a, &$b) {
if (!empty($b['params']) && $b['params']['type'] == Type::SYSTEM if (!empty($b['params']) && $b['params']['type'] == Notification\Type::SYSTEM
&& !empty($b['params']['system_type']) && $b['params']['system_type'] === 'testdrive_expire') { && !empty($b['params']['system_type']) && $b['params']['system_type'] === 'testdrive_expire') {
$b['itemlink'] = DI::baseUrl()->get(); $b['itemlink'] = DI::baseUrl()->get();
$b['epreamble'] = $b['preamble'] = DI::l10n()->t('Your account on %s will expire in a few days.', DI::config()->get('system', 'sitename')); $b['epreamble'] = $b['preamble'] = DI::l10n()->t('Your account on %s will expire in a few days.', DI::config()->get('system', 'sitename'));