X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Fmessage.php;h=d75fb240f01025ba23a40547c2e837b222d0bd76;hb=74990093fd67e3e57d534bdcc57383156e26fc49;hp=1e8c012eeb622b5f5dfa663a3f2b6da10d4c5829;hpb=b3226e11ac23e6487cb9539bc73c66fe6627ee44;p=friendica.git diff --git a/mod/message.php b/mod/message.php index 1e8c012eeb..d75fb240f0 100644 --- a/mod/message.php +++ b/mod/message.php @@ -54,11 +54,10 @@ function message_init(App $a) '$tabs' => $tabs, '$new' => $new, ]); - $base = DI::baseUrl(); $head_tpl = Renderer::getMarkupTemplate('message-head.tpl'); DI::page()['htmlhead'] .= Renderer::replaceMacros($head_tpl, [ - '$base' => $base + '$base' => (string)DI::baseUrl() ]); } @@ -69,12 +68,13 @@ function message_post(App $a) return; } + $sender_id = DI::userSession()->getLocalUserId(); $replyto = !empty($_REQUEST['replyto']) ? trim($_REQUEST['replyto']) : ''; $subject = !empty($_REQUEST['subject']) ? trim($_REQUEST['subject']) : ''; $body = !empty($_REQUEST['body']) ? Strings::escapeHtml(trim($_REQUEST['body'])) : ''; $recipient = !empty($_REQUEST['recipient']) ? intval($_REQUEST['recipient']) : 0; - $ret = Mail::send($recipient, $body, $subject, $replyto); + $ret = Mail::send($sender_id, $recipient, $body, $subject, $replyto); $norecip = false; switch ($ret) { @@ -435,7 +435,7 @@ function render_messages(array $msg, string $t): string $to_name_e = $rr['name']; if (is_null($rr['url'])) { - // contact-id is pointing to a non existing contact + // contact-id is pointing to a nonexistent contact continue; }