]> git.mxchange.org Git - friendica-addons.git/commitdiff
Move Notify::TYPE_SYSTEM
authornupplaPhil <admin+github@philipp.info>
Tue, 4 Feb 2020 21:23:37 +0000 (22:23 +0100)
committernupplaPhil <admin+github@philipp.info>
Wed, 5 Feb 2020 20:43:31 +0000 (21:43 +0100)
public_server/public_server.php
testdrive/testdrive.php

index 04500188f209712d09e990b6011252a920b79626..a02c8672a8a84ccfe16b8255ecb95ef861d4aa62 100644 (file)
@@ -13,6 +13,7 @@ use Friendica\Core\Logger;
 use Friendica\Core\Renderer;
 use Friendica\Database\DBA;
 use Friendica\DI;
+use Friendica\Model\Notify\Type;
 use Friendica\Util\ConfigFileLoader;
 use Friendica\Util\DateTimeFormat;
 use Friendica\Util\Strings;
@@ -67,7 +68,7 @@ function public_server_cron($a, $b)
                foreach ($r as $rr) {
                        notification([
                                'uid' => $rr['uid'],
-                               'type' => NOTIFY_SYSTEM,
+                               'type' => Type::SYSTEM,
                                'system_type' => 'public_server_expire',
                                'language'     => $rr['language'],
                                'to_name'      => $rr['username'],
@@ -123,7 +124,7 @@ function public_server_cron($a, $b)
 
 function public_server_enotify(&$a, &$b)
 {
-       if (!empty($b['params']) && $b['params']['type'] == NOTIFY_SYSTEM
+       if (!empty($b['params']) && $b['params']['type'] == 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 1732c6a9883dff6509faf6c4dd757b7392c35a73..cb95babfcb0402f792da59451d80e5d63e887bea 100644 (file)
@@ -11,6 +11,7 @@ use Friendica\Core\Hook;
 use Friendica\Core\Search;
 use Friendica\Database\DBA;
 use Friendica\DI;
+use Friendica\Model\Notify\Type;
 use Friendica\Model\User;
 use Friendica\Util\ConfigFileLoader;
 use Friendica\Util\DateTimeFormat;
@@ -69,7 +70,7 @@ function testdrive_cron($a,$b) {
                foreach($r as $rr) {
                        notification([
                                'uid' => $rr['uid'],
-                               'type' => NOTIFY_SYSTEM,
+                               'type' => Type::SYSTEM,
                                'system_type' => 'testdrive_expire',
                                'language'     => $rr['language'],
                                'to_name'      => $rr['username'],
@@ -96,7 +97,7 @@ function testdrive_cron($a,$b) {
 }
 
 function testdrive_enotify(&$a, &$b) {
-    if (!empty($b['params']) && $b['params']['type'] == NOTIFY_SYSTEM
+    if (!empty($b['params']) && $b['params']['type'] == 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'));