X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Fmessage.php;h=d75fb240f01025ba23a40547c2e837b222d0bd76;hb=a609e545b66808f8a8e6c9d2f8dab08acd968880;hp=794d2ace43e428806950581906e2060300c04fc4;hpb=5985563149e11c5b6c91d7ed5fcf64a1c991a82e;p=friendica.git diff --git a/mod/message.php b/mod/message.php index 794d2ace43..d75fb240f0 100644 --- a/mod/message.php +++ b/mod/message.php @@ -1,6 +1,6 @@ $tabs, '$new' => $new, ]); - $base = DI::baseUrl(); $head_tpl = Renderer::getMarkupTemplate('message-head.tpl'); DI::page()['htmlhead'] .= Renderer::replaceMacros($head_tpl, [ - '$baseurl' => DI::baseUrl()->get(true), - '$base' => $base + '$base' => (string)DI::baseUrl() ]); } @@ -70,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) { @@ -178,7 +177,6 @@ function message_content(App $a) $tpl = Renderer::getMarkupTemplate('msg-header.tpl'); DI::page()['htmlhead'] .= Renderer::replaceMacros($tpl, [ - '$baseurl' => DI::baseUrl()->get(true), '$nickname' => $a->getLoggedInUserNickname(), '$linkurl' => DI::l10n()->t('Please enter a link URL:') ]); @@ -284,7 +282,6 @@ function message_content(App $a) $tpl = Renderer::getMarkupTemplate('msg-header.tpl'); DI::page()['htmlhead'] .= Renderer::replaceMacros($tpl, [ - '$baseurl' => DI::baseUrl()->get(true), '$nickname' => $a->getLoggedInUserNickname(), '$linkurl' => DI::l10n()->t('Please enter a link URL:') ]); @@ -438,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; }