From: nupplaPhil Date: Tue, 4 Feb 2020 21:11:11 +0000 (+0100) Subject: Move Notify::TYPE_SUGGEST X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=88dc3efdc90c0c0ac4e0b3df7d0123ba6fca258c;p=friendica.git Move Notify::TYPE_SUGGEST --- diff --git a/boot.php b/boot.php index 4c16f59d60..950624ad44 100644 --- a/boot.php +++ b/boot.php @@ -140,7 +140,6 @@ define('MAX_LIKERS', 75); * Email notification options * @{ */ -define('NOTIFY_SUGGEST', 32); define('NOTIFY_PROFILE', 64); define('NOTIFY_TAGSELF', 128); define('NOTIFY_TAGSHARE', 256); diff --git a/include/enotify.php b/include/enotify.php index ad141e1c47..03fa428e89 100644 --- a/include/enotify.php +++ b/include/enotify.php @@ -319,7 +319,7 @@ function notification($params) } } - if ($params['type'] == NOTIFY_SUGGEST) { + if ($params['type'] == Notify\Type::SUGGEST) { $itemlink = $params['link']; $subject = $l10n->t('[Friendica:Notify] Friend suggestion received'); diff --git a/mod/settings.php b/mod/settings.php index 7ae0f6479e..bce3ac8be5 100644 --- a/mod/settings.php +++ b/mod/settings.php @@ -1235,7 +1235,7 @@ function settings_content(App $a) '$notify3' => ['notify3', DI::l10n()->t('Someone writes on your profile wall'), ($notify & Type::WALL), Type::WALL, ''], '$notify4' => ['notify4', DI::l10n()->t('Someone writes a followup comment'), ($notify & Type::COMMENT), Type::COMMENT, ''], '$notify5' => ['notify5', DI::l10n()->t('You receive a private message'), ($notify & Type::MAIL), Type::MAIL, ''], - '$notify6' => ['notify6', DI::l10n()->t('You receive a friend suggestion'), ($notify & NOTIFY_SUGGEST), NOTIFY_SUGGEST, ''], + '$notify6' => ['notify6', DI::l10n()->t('You receive a friend suggestion'), ($notify & Type::SUGGEST), Type::SUGGEST, ''], '$notify7' => ['notify7', DI::l10n()->t('You are tagged in a post'), ($notify & NOTIFY_TAGSELF), NOTIFY_TAGSELF, ''], '$notify8' => ['notify8', DI::l10n()->t('You are poked/prodded/etc. in a post'), ($notify & NOTIFY_POKE), NOTIFY_POKE, ''], diff --git a/src/Model/Notify/Type.php b/src/Model/Notify/Type.php index fbc31da373..9c7e3b6deb 100644 --- a/src/Model/Notify/Type.php +++ b/src/Model/Notify/Type.php @@ -17,4 +17,6 @@ class Type const COMMENT = 8; /** @var int Notification about a private message */ const MAIL = 16; + /** @var int Notification about a friend suggestion */ + const SUGGEST = 32; } diff --git a/src/Protocol/DFRN.php b/src/Protocol/DFRN.php index 424b519063..b15816bc77 100644 --- a/src/Protocol/DFRN.php +++ b/src/Protocol/DFRN.php @@ -25,6 +25,7 @@ use Friendica\Model\Event; use Friendica\Model\GContact; use Friendica\Model\Item; use Friendica\Model\Mail; +use Friendica\Model\Notify\Type; use Friendica\Model\PermissionSet; use Friendica\Model\Profile; use Friendica\Model\User; @@ -1892,7 +1893,7 @@ class DFRN notification( [ - 'type' => NOTIFY_SUGGEST, + 'type' => Type::SUGGEST, 'notify_flags' => $importer['notify-flags'], 'language' => $importer['language'], 'to_name' => $importer['username'],