]> git.mxchange.org Git - friendica.git/blobdiff - mod/wallmessage.php
Move PConfig::load() to DI::pConfig()->load()
[friendica.git] / mod / wallmessage.php
index 780230b8c700e479dfc28744b41877ddb9b88f40..1d7af713606083137a66a96672db73456ecc7d4f 100644 (file)
@@ -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,8 +117,8 @@ 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:')
        ]);
@@ -131,8 +131,8 @@ function wallmessage_content(App $a) {
                '$subject'    => L10n::t('Subject:'),
                '$recipname'  => $user['username'],
                '$nickname'   => $user['nickname'],
-               '$subjtxt'    => defaults($_REQUEST, 'subject', ''),
-               '$text'       => defaults($_REQUEST, 'body', ''),
+               '$subjtxt'    => $_REQUEST['subject'] ?? '',
+               '$text'       => $_REQUEST['body'] ?? '',
                '$readonly'   => '',
                '$yourmessage'=> L10n::t('Your message:'),
                '$parent'     => '',