]> git.mxchange.org Git - friendica.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:41:07 +0000 (21:41 +0100)
boot.php
include/enotify.php
src/Model/Notify/Type.php
src/Module/Register.php

index df7dc85608e42f135c23bf47a8711af85a076324..40729a78c023aba1c58bfb6aa99d2437556da417 100644 (file)
--- a/boot.php
+++ b/boot.php
@@ -134,17 +134,6 @@ $netgroup_ids = [
  */
 define('MAX_LIKERS',    75);
 
-/**
- * @name Notify
- *
- * Email notification options
- * @{
- */
-
-define('NOTIFY_SYSTEM',   32768);
-/* @}*/
-
-
 /** @deprecated since 2019.03, use Term::UNKNOWN instead */
 define('TERM_UNKNOWN',   Term::UNKNOWN);
 /** @deprecated since 2019.03, use Term::HASHTAG instead */
index 6d261720e56ee71fae1c578b368d5249dbc8eb4e..96630ca3ecff69c280544fe4fc8d86e803b3d635 100644 (file)
@@ -375,7 +375,7 @@ function notification($params)
                }
        }
 
-       if ($params['type'] == NOTIFY_SYSTEM) {
+       if ($params['type'] == Notify\Type::SYSTEM) {
                switch($params['event']) {
                        case "SYSTEM_REGISTER_REQUEST":
                                $itemlink =  $params['link'];
@@ -456,7 +456,7 @@ function notification($params)
 
        // send email notification if notification preferences permit
        if ((intval($params['notify_flags']) & intval($params['type']))
-               || $params['type'] == NOTIFY_SYSTEM) {
+               || $params['type'] == Notify\Type::SYSTEM) {
 
                Logger::log('sending notification email');
 
index f15c1b76a75989c0fc00a3110ba64aacb8cd649d..aae5fedc05e3b603e30fc2162daa60abe16a7bd1 100644 (file)
@@ -8,7 +8,7 @@ namespace Friendica\Model\Notify;
 class Type
 {
        /** @var int Notification about a introduction */
-       const INTRO  = 1;
+       const INTRO = 1;
        /** @var int Notification about a confirmed introduction */
        const CONFIRM = 2;
        /** @var int Notification about a post on your wall */
@@ -33,4 +33,7 @@ class Type
        const POKE = 512;
        /** @var int Notification about either a contact had posted something directly or the contact is a mentioned forum */
        const SHARE = 1024;
+
+       /** @var int Global System notifications */
+       const SYSTEM = 32768;
 }
index 98af06543d1d2f1552c637806d5f0c300b7dd4f4..8401a215a8a15f162be8861d2b46a7529a591951 100644 (file)
@@ -348,7 +348,7 @@ class Register extends BaseModule
                        // send notification to admins
                        while ($admin = DBA::fetch($admins_stmt)) {
                                \notification([
-                                       'type'         => NOTIFY_SYSTEM,
+                                       'type'         => Model\Notify\Type::SYSTEM,
                                        'event'        => 'SYSTEM_REGISTER_REQUEST',
                                        'source_name'  => $user['username'],
                                        'source_mail'  => $user['email'],