X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=include%2Fenotify.php;h=257c10720781874e22c4d1b94055f33b74194758;hb=c37d141654d9c0c5fd9ff8bf4d127ca4973d46be;hp=1e2008392d3438494ee0c20d1850f116ef8dd7b9;hpb=789561c7a2e53f374ec0c90eceb928ed66af68c7;p=friendica.git diff --git a/include/enotify.php b/include/enotify.php index 1e2008392d..257c107207 100644 --- a/include/enotify.php +++ b/include/enotify.php @@ -16,10 +16,10 @@ use Friendica\Util\Emailer; * @brief Creates a notification entry and possibly sends a mail * * @param array $params Array with the elements: - uid, item, parent, type, otype, verb, event, - link, subject, body, to_name, to_email, source_name, - source_link, activity, preamble, notify_flags, - language, show_in_notification_page + * uid, item, parent, type, otype, verb, event, + * link, subject, body, to_name, to_email, source_name, + * source_link, activity, preamble, notify_flags, + * language, show_in_notification_page */ function notification($params) { @@ -45,10 +45,7 @@ function notification($params) $hostname = substr($hostname, 0, strpos($hostname, ':')); } - $sender_email = $a->config['sender_email']; - if (empty($sender_email)) { - $sender_email = L10n::t('noreply').'@'.$hostname; - } + $sender_email = $a->getSenderEmailAddress(); if ($params['type'] != SYSTEM_EMAIL) { $user = dba::selectFirst('user', ['nickname', 'page-flags'], @@ -155,7 +152,7 @@ function notification($params) } // "your post" - if (DBM::is_result($item) && $item['owner-name'] == $item['author-name'] && $item['wall']) { + if (DBM::is_result($item) && $item['owner-id'] == $item['author-id'] && $item['wall']) { $dest_str = L10n::t('%1$s commented on [url=%2$s]your %3$s[/url]', '[url='.$params['source_link'].']'.$params['source_name'].'[/url]', $itemlink, @@ -360,7 +357,7 @@ function notification($params) if ($params['type'] == NOTIFY_SYSTEM) { switch($params['event']) { case "SYSTEM_REGISTER_REQUEST": - $subject = L10n::t('[Friendica System:Notify] registration request'); + $subject = L10n::t('[Friendica System Notify]') . ' ' . L10n::t('registration request'); $preamble = L10n::t('You\'ve received a registration request from \'%1$s\' at %2$s', $params['source_name'], $sitename); $epreamble = L10n::t('You\'ve received a [url=%1$s]registration request[/url] from %2$s.', @@ -368,7 +365,7 @@ function notification($params) '[url='.$params['source_link'].']'.$params['source_name'].'[/url]' ); - $body = L10n::t('Full Name: %1$s\nSite Location: %2$s\nLogin Name: %3$s ' . "\x28" . '%4$s' . "\x28", + $body = L10n::t('Full Name: %1$s\nSite Location: %2$s\nLogin Name: %3$s ' . "\x28" . '%4$s' . "\x29", $params['source_name'], $siteurl, $params['source_mail'], $params['source_nick']