X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Fwallmessage.php;h=1d7af713606083137a66a96672db73456ecc7d4f;hb=6e2880c6799e5c98e41ea40e1bdbac7bfe6ae326;hp=d93104644ed6462426b2dbb3afec7517f35b76d3;hpb=5a3991d4f7bc929c1087d9275716fc1c8cc299a6;p=friendica.git diff --git a/mod/wallmessage.php b/mod/wallmessage.php index d93104644e..1d7af71360 100644 --- a/mod/wallmessage.php +++ b/mod/wallmessage.php @@ -6,8 +6,8 @@ use Friendica\App; use Friendica\Core\L10n; use Friendica\Core\Logger; use Friendica\Core\Renderer; -use Friendica\Core\System; use Friendica\Database\DBA; +use Friendica\DI; use Friendica\Model\Mail; use Friendica\Model\Profile; use Friendica\Util\Strings; @@ -72,7 +72,7 @@ function wallmessage_post(App $a) { info(L10n::t('Message sent.') . EOL); } - $a->internalRedirect('profile/'.$user['nickname']); + DI::baseUrl()->redirect('profile/'.$user['nickname']); } @@ -117,28 +117,28 @@ function wallmessage_content(App $a) { } $tpl = Renderer::getMarkupTemplate('wallmsg-header.tpl'); - $a->page['htmlhead'] .= Renderer::replaceMacros($tpl, [ - '$baseurl' => System::baseUrl(true), + DI::page()['htmlhead'] .= Renderer::replaceMacros($tpl, [ + '$baseurl' => DI::baseUrl()->get(true), '$nickname' => $user['nickname'], '$linkurl' => L10n::t('Please enter a link URL:') ]); $tpl = Renderer::getMarkupTemplate('wallmessage.tpl'); $o = Renderer::replaceMacros($tpl, [ - '$header' => L10n::t('Send Private Message'), - '$subheader' => L10n::t('If you wish for %s to respond, please check that the privacy settings on your site allow private mail from unknown senders.', $user['username']), - '$to' => L10n::t('To:'), - '$subject' => L10n::t('Subject:'), - '$recipname' => $user['username'], - '$nickname' => $user['nickname'], - '$subjtxt' => (!empty($_REQUEST['subject']) ? strip_tags($_REQUEST['subject']) : ''), - '$text' => (!empty($_REQUEST['body']) ? Strings::escapeHtml(htmlspecialchars($_REQUEST['body'])) : ''), - '$readonly' => '', - '$yourmessage' => L10n::t('Your message:'), - '$parent' => '', - '$upload' => L10n::t('Upload photo'), - '$insert' => L10n::t('Insert web link'), - '$wait' => L10n::t('Please wait') + '$header' => L10n::t('Send Private Message'), + '$subheader' => L10n::t('If you wish for %s to respond, please check that the privacy settings on your site allow private mail from unknown senders.', $user['username']), + '$to' => L10n::t('To:'), + '$subject' => L10n::t('Subject:'), + '$recipname' => $user['username'], + '$nickname' => $user['nickname'], + '$subjtxt' => $_REQUEST['subject'] ?? '', + '$text' => $_REQUEST['body'] ?? '', + '$readonly' => '', + '$yourmessage'=> L10n::t('Your message:'), + '$parent' => '', + '$upload' => L10n::t('Upload photo'), + '$insert' => L10n::t('Insert web link'), + '$wait' => L10n::t('Please wait') ]); return $o;