]> git.mxchange.org Git - friendica-addons.git/commitdiff
[various] Fix Notification class paths
authorHypolite Petovan <hypolite@mrpetovan.com>
Wed, 3 Feb 2021 22:29:09 +0000 (17:29 -0500)
committerHypolite Petovan <hypolite@mrpetovan.com>
Wed, 3 Feb 2021 22:29:09 +0000 (17:29 -0500)
- Address https://github.com/friendica/friendica/issues/9896
- Follow-up to https://github.com/friendica/friendica/pull/9860

public_server/public_server.php
testdrive/testdrive.php

index 472a442f98e05461a35b629dad281dec3c27f91c..482a8a0c65a75824e74e05885306ae28ff96c99f 100644 (file)
@@ -58,7 +58,7 @@ function public_server_cron($a, $b)
        if (DBA::isResult($r)) {
                foreach ($r as $rr) {
                        notification([
-                               'type' => Notification/Type::SYSTEM,
+                               'type' => Notification\Type::SYSTEM,
                                'uid' => $rr['uid'],
                                'system_type' => 'public_server_expire',
                                'source_name'  => DI::l10n()->t('Administrator'),
@@ -112,7 +112,7 @@ function public_server_cron($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') {
                $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'));
index e0e0fb57bd9eb4ca5e1856e807e67e6c54fe5519..7c3af59e0253e21c5442d605dc5895669db64823 100644 (file)
@@ -58,7 +58,7 @@ function testdrive_cron($a,$b) {
        if(count($r)) {
                foreach($r as $rr) {
                        notification([
-                               'type' => Notification/Type::SYSTEM,
+                               'type' => Notification\Type::SYSTEM,
                                'uid' => $rr['uid'],
                                'system_type' => 'testdrive_expire',
                                'source_name'  => DI::l10n()->t('Administrator'),
@@ -83,7 +83,7 @@ function testdrive_cron($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') {
         $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'));