X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Fmessage.php;h=e2380fdb5c5c7d5504588fba97b86f937c2d5a80;hb=57fe36e9a3e414b21544335dad4484193edc36ae;hp=6a48eb658e523317e7e7f681fb9f27e6a1b5cfd1;hpb=eecd1e47e4752f6a71f944455dd95fc837683cad;p=friendica.git diff --git a/mod/message.php b/mod/message.php index 6a48eb658e..e2380fdb5c 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'; @@ -91,7 +92,7 @@ function message_post(App $a) $a->argc = 2; $a->argv[1] = 'new'; } else { - goaway($_SESSION['return_url']); + goaway($a->cmd . '/' . $ret); } } @@ -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'])) { //