]> git.mxchange.org Git - friendica.git/blobdiff - mod/message.php
spelling: documentation
[friendica.git] / mod / message.php
index 794d2ace43e428806950581906e2060300c04fc4..99fb6b3b41cbc4e39787175edfd0921c2a8d8c95 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /**
- * @copyright Copyright (C) 2010-2022, the Friendica project
+ * @copyright Copyright (C) 2010-2023, the Friendica project
  *
  * @license GNU AGPL version 3 or any later version
  *
@@ -58,7 +58,6 @@ function message_init(App $a)
 
        $head_tpl = Renderer::getMarkupTemplate('message-head.tpl');
        DI::page()['htmlhead'] .= Renderer::replaceMacros($head_tpl, [
-               '$baseurl' => DI::baseUrl()->get(true),
                '$base'    => $base
        ]);
 }
@@ -70,12 +69,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 +178,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 +283,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:')
                ]);