X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Fmessage.php;h=d75fb240f01025ba23a40547c2e837b222d0bd76;hb=74990093fd67e3e57d534bdcc57383156e26fc49;hp=726db0a754a6002d9b110726e80120895e958899;hpb=6aa1dcfad371f34fea1f8e39b73de2cc3dd05784;p=friendica.git diff --git a/mod/message.php b/mod/message.php index 726db0a754..d75fb240f0 100644 --- a/mod/message.php +++ b/mod/message.php @@ -54,12 +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, [ - '$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; }