]> git.mxchange.org Git - friendica.git/commitdiff
Move Notify::TYPE_CONFIRM
authornupplaPhil <admin+github@philipp.info>
Tue, 4 Feb 2020 21:05:56 +0000 (22:05 +0100)
committernupplaPhil <admin+github@philipp.info>
Wed, 5 Feb 2020 20:41:00 +0000 (21:41 +0100)
boot.php
include/enotify.php
mod/dfrn_confirm.php
mod/settings.php
src/Model/Notify/Type.php

index f708ff8820c3443b0241f368329f809c2822f770..759e4e24f1ca025a3cd9637efa6977c9c669dcd5 100644 (file)
--- a/boot.php
+++ b/boot.php
@@ -140,7 +140,6 @@ define('MAX_LIKERS',    75);
  * Email notification options
  * @{
  */
-define('NOTIFY_CONFIRM',      2);
 define('NOTIFY_WALL',         4);
 define('NOTIFY_COMMENT',      8);
 define('NOTIFY_MAIL',        16);
index 141fd36757bf89482fb84ad936b0c75d67f71f02..f51c88eae88a9be63bfdf53afffe05799d7fef1c 100644 (file)
@@ -339,7 +339,7 @@ function notification($params)
                $hsitelink = sprintf($sitelink, '<a href="'.$siteurl.'">'.$sitename.'</a>');
        }
 
-       if ($params['type'] == NOTIFY_CONFIRM) {
+       if ($params['type'] == Notify\Type::CONFIRM) {
                if ($params['verb'] == Activity::FRIEND) { // mutual connection
                        $itemlink =  $params['link'];
                        $subject = $l10n->t('[Friendica:Notify] Connection accepted');
index 60a96a92664e84fd5cdacc38b94e7dd9a4bb9260..a8544ca7dc45ac6254cfb129d759fb6850e935e7 100644 (file)
@@ -26,6 +26,7 @@ use Friendica\Database\DBA;
 use Friendica\DI;
 use Friendica\Model\Contact;
 use Friendica\Model\Group;
+use Friendica\Model\Notify\Type;
 use Friendica\Model\User;
 use Friendica\Protocol\Activity;
 use Friendica\Util\Crypto;
@@ -525,10 +526,10 @@ function dfrn_confirm_post(App $a, $handsfree = null)
                if (DBA::isResult($r)) {
                        $combined = $r[0];
 
-                       if ($combined['notify-flags'] & NOTIFY_CONFIRM) {
+                       if ($combined['notify-flags'] & Type::CONFIRM) {
                                $mutual = ($new_relation == Contact::FRIEND);
                                notification([
-                                       'type'         => NOTIFY_CONFIRM,
+                                       'type'         => Type::CONFIRM,
                                        'notify_flags' => $combined['notify-flags'],
                                        'language'     => $combined['language'],
                                        'to_name'      => $combined['username'],
index 3a9d911042c335ee170bf31ff8e51cb3cbd72307..a12d8a71f090a471d1b81c687379c57e072ceec0 100644 (file)
@@ -1230,8 +1230,8 @@ function settings_content(App $a)
 
                '$h_not'        => DI::l10n()->t('Notification Settings'),
                '$lbl_not'      => DI::l10n()->t('Send a notification email when:'),
-               '$notify1'      => ['notify1', DI::l10n()->t('You receive an introduction'), ($notify & Type::INTRO), NOTIFY_INTRO, ''],
-               '$notify2'      => ['notify2', DI::l10n()->t('Your introductions are confirmed'), ($notify & NOTIFY_CONFIRM), NOTIFY_CONFIRM, ''],
+               '$notify1'      => ['notify1', DI::l10n()->t('You receive an introduction'), ($notify & Type::INTRO), Type::INTRO, ''],
+               '$notify2'      => ['notify2', DI::l10n()->t('Your introductions are confirmed'), ($notify & Type::CONFIRM), NOTIFY_CONFIRM, ''],
                '$notify3'      => ['notify3', DI::l10n()->t('Someone writes on your profile wall'), ($notify & NOTIFY_WALL), NOTIFY_WALL, ''],
                '$notify4'      => ['notify4', DI::l10n()->t('Someone writes a followup comment'), ($notify & NOTIFY_COMMENT), NOTIFY_COMMENT, ''],
                '$notify5'      => ['notify5', DI::l10n()->t('You receive a private message'), ($notify & NOTIFY_MAIL), NOTIFY_MAIL, ''],
index 5f34e1aa3928db9650d4ea6e77dffbf98de2744e..550a818d44b7b3dcf683b71ae710e6bb9150eaea 100644 (file)
@@ -9,4 +9,6 @@ class Type
 {
        /** @var int Introduction notifications */
        const INTRO  = 1;
+       /** @var int Notification about a confirmed introduction */
+       const CONFIRM = 2;
 }