X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Fmessage.php;h=06542bbaf24708f507448f88f817cc9c6aa4c755;hb=7789ea25079801ee1425368e9bf2f7ce80d16d88;hp=bff62a554d6e036db96a75de3dc28807db83b8d0;hpb=a9a36fb3029c9a5d595aa28a9f0a79f441d1b121;p=friendica.git diff --git a/mod/message.php b/mod/message.php index bff62a554d..06542bbaf2 100644 --- a/mod/message.php +++ b/mod/message.php @@ -1,6 +1,22 @@ . + * */ use Friendica\App; @@ -8,7 +24,6 @@ use Friendica\Content\Nav; use Friendica\Content\Pager; use Friendica\Content\Text\BBCode; use Friendica\Core\ACL; -use Friendica\Core\L10n; use Friendica\Core\Renderer; use Friendica\Database\DBA; use Friendica\DI; @@ -16,7 +31,6 @@ use Friendica\Model\Contact; use Friendica\Model\Mail; use Friendica\Module\Security\Login; use Friendica\Util\DateTimeFormat; -use Friendica\Util\Proxy as ProxyUtils; use Friendica\Util\Strings; use Friendica\Util\Temporal; @@ -52,34 +66,32 @@ function message_init(App $a) function message_post(App $a) { if (!local_user()) { - notice(DI::l10n()->t('Permission denied.') . EOL); + notice(DI::l10n()->t('Permission denied.')); return; } $replyto = !empty($_REQUEST['replyto']) ? Strings::escapeTags(trim($_REQUEST['replyto'])) : ''; $subject = !empty($_REQUEST['subject']) ? Strings::escapeTags(trim($_REQUEST['subject'])) : ''; $body = !empty($_REQUEST['body']) ? Strings::escapeHtml(trim($_REQUEST['body'])) : ''; - $recipient = !empty($_REQUEST['messageto']) ? intval($_REQUEST['messageto']) : 0; + $recipient = !empty($_REQUEST['recipient']) ? intval($_REQUEST['recipient']) : 0; $ret = Mail::send($recipient, $body, $subject, $replyto); $norecip = false; switch ($ret) { case -1: - notice(DI::l10n()->t('No recipient selected.') . EOL); + notice(DI::l10n()->t('No recipient selected.')); $norecip = true; break; case -2: - notice(DI::l10n()->t('Unable to locate contact information.') . EOL); + notice(DI::l10n()->t('Unable to locate contact information.')); break; case -3: - notice(DI::l10n()->t('Message could not be sent.') . EOL); + notice(DI::l10n()->t('Message could not be sent.')); break; case -4: - notice(DI::l10n()->t('Message collection failure.') . EOL); + notice(DI::l10n()->t('Message collection failure.')); break; - default: - info(DI::l10n()->t('Message sent.') . EOL); } // fake it to go back to the input form if no recipient listed @@ -97,7 +109,7 @@ function message_content(App $a) Nav::setSelected('messages'); if (!local_user()) { - notice(DI::l10n()->t('Permission denied.') . EOL); + notice(DI::l10n()->t('Permission denied.')); return Login::form(); } @@ -128,51 +140,20 @@ function message_content(App $a) return; } - // Check if we should do HTML-based delete confirmation - if (!empty($_REQUEST['confirm'])) { - //