From: nupplaPhil Date: Tue, 4 Feb 2020 21:07:10 +0000 (+0100) Subject: Move Notify::TYPE_WALL X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=b86ad370014f130b10343a870c9ac9a66c87162d;p=friendica.git Move Notify::TYPE_WALL --- diff --git a/boot.php b/boot.php index 759e4e24f1..3f7087622a 100644 --- a/boot.php +++ b/boot.php @@ -140,7 +140,6 @@ define('MAX_LIKERS', 75); * Email notification options * @{ */ -define('NOTIFY_WALL', 4); define('NOTIFY_COMMENT', 8); define('NOTIFY_MAIL', 16); define('NOTIFY_SUGGEST', 32); diff --git a/include/enotify.php b/include/enotify.php index f51c88eae8..fe38fad2d4 100644 --- a/include/enotify.php +++ b/include/enotify.php @@ -212,7 +212,7 @@ function notification($params) $itemlink = $params['link']; } - if ($params['type'] == NOTIFY_WALL) { + if ($params['type'] == Notify\Type::WALL) { $subject = $l10n->t('[Friendica:Notify] %s posted to your profile wall', $params['source_name']); $preamble = $l10n->t('%1$s posted to your profile wall at %2$s', $params['source_name'], $sitename); diff --git a/mod/item.php b/mod/item.php index 3edf49f86c..717c656d18 100644 --- a/mod/item.php +++ b/mod/item.php @@ -31,6 +31,7 @@ use Friendica\Model\Contact; use Friendica\Model\Conversation; use Friendica\Model\FileTag; use Friendica\Model\Item; +use Friendica\Model\Notify\Type; use Friendica\Model\Photo; use Friendica\Model\Term; use Friendica\Network\HTTPException; @@ -771,7 +772,7 @@ function item_post(App $a) { } else { if (($contact_record != $author) && !count($forum_contact)) { notification([ - 'type' => NOTIFY_WALL, + 'type' => Type::WALL, 'notify_flags' => $user['notify-flags'], 'language' => $user['language'], 'to_name' => $user['username'], diff --git a/mod/settings.php b/mod/settings.php index a12d8a71f0..855a5a1ce0 100644 --- a/mod/settings.php +++ b/mod/settings.php @@ -1231,8 +1231,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), 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, ''], + '$notify2' => ['notify2', DI::l10n()->t('Your introductions are confirmed'), ($notify & Type::CONFIRM), Type::CONFIRM, ''], + '$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 & NOTIFY_COMMENT), NOTIFY_COMMENT, ''], '$notify5' => ['notify5', DI::l10n()->t('You receive a private message'), ($notify & NOTIFY_MAIL), NOTIFY_MAIL, ''], '$notify6' => ['notify6', DI::l10n()->t('You receive a friend suggestion'), ($notify & NOTIFY_SUGGEST), NOTIFY_SUGGEST, ''], diff --git a/src/Model/Notify/Type.php b/src/Model/Notify/Type.php index 550a818d44..f026e081fd 100644 --- a/src/Model/Notify/Type.php +++ b/src/Model/Notify/Type.php @@ -7,8 +7,10 @@ namespace Friendica\Model\Notify; */ class Type { - /** @var int Introduction notifications */ + /** @var int Notification about a introduction */ const INTRO = 1; /** @var int Notification about a confirmed introduction */ const CONFIRM = 2; + /** @var int Notification about a post on your wall */ + const WALL = 4; }