X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=mod%2Fmessage.php;h=223976ddbef637731dc24877e22c14735622924a;hb=7529fc61dd9169368224a092bcdf7d3cfeee1982;hp=6a48eb658e523317e7e7f681fb9f27e6a1b5cfd1;hpb=3bb5a416f8d6bfe7e6b1de3debe2828d7e50d3cc;p=friendica.git diff --git a/mod/message.php b/mod/message.php index 6a48eb658e..223976ddbe 100644 --- a/mod/message.php +++ b/mod/message.php @@ -10,10 +10,11 @@ use Friendica\Content\Text\BBCode; use Friendica\Core\ACL; use Friendica\Core\L10n; use Friendica\Core\System; -use Friendica\Database\DBM; +use Friendica\Database\DBA; use Friendica\Model\Contact; use Friendica\Model\Mail; use Friendica\Util\DateTimeFormat; +use Friendica\Util\Proxy as ProxyUtils; use Friendica\Util\Temporal; require_once 'include/conversation.php'; @@ -108,8 +109,23 @@ function message_content(App $a) $myprofile = System::baseUrl() . '/profile/' . $a->user['nickname']; $tpl = get_markup_template('mail_head.tpl'); + if ($a->argc > 1 && $a->argv[1] == 'new') { + $button = [ + 'label' => L10n::t('Discard'), + 'url' => '/message', + 'sel' => 'close', + ]; + } else { + $button = [ + 'label' => L10n::t('New Message'), + 'url' => '/message/new', + 'sel' => 'new', + 'accesskey' => 'm', + ]; + } $header = replace_macros($tpl, [ '$messages' => L10n::t('Messages'), + '$button' => $button, ]); if (($a->argc == 3) && ($a->argv[1] === 'drop' || $a->argv[1] === 'dropconv')) { @@ -118,7 +134,7 @@ function message_content(App $a) } // Check if we should do HTML-based delete confirmation - if ($_REQUEST['confirm']) { + if (!empty($_REQUEST['confirm'])) { //