Merge pull request #5478 from MrPetovan/task/5410-add-missing-use-statements
[friendica.git/.git] / mod / wallmessage.php
index 250b7d7..5606b6f 100644 (file)
@@ -5,7 +5,7 @@
 use Friendica\App;
 use Friendica\Core\L10n;
 use Friendica\Core\System;
-use Friendica\Database\DBM;
+use Friendica\Database\DBA;
 use Friendica\Model\Mail;
 use Friendica\Model\Profile;
 
@@ -26,10 +26,10 @@ function wallmessage_post(App $a) {
        }
 
        $r = q("select * from user where nickname = '%s' limit 1",
-               dbesc($recipient)
+               DBA::escape($recipient)
        );
 
-       if (! DBM::is_result($r)) {
+       if (! DBA::isResult($r)) {
                logger('wallmessage: no recipient');
                return;
        }
@@ -88,10 +88,10 @@ function wallmessage_content(App $a) {
        }
 
        $r = q("select * from user where nickname = '%s' limit 1",
-               dbesc($recipient)
+               DBA::escape($recipient)
        );
 
-       if (! DBM::is_result($r)) {
+       if (! DBA::isResult($r)) {
                notice(L10n::t('No recipient.') . EOL);
                logger('wallmessage: no recipient');
                return;
@@ -128,7 +128,7 @@ function wallmessage_content(App $a) {
        ]);
 
        $tpl = get_markup_template('wallmessage.tpl');
-       $o .= replace_macros($tpl, [
+       $o = replace_macros($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:'),
@@ -139,7 +139,6 @@ function wallmessage_content(App $a) {
                '$text' => ((x($_REQUEST, 'body')) ? escape_tags(htmlspecialchars($_REQUEST['body'])) : ''),
                '$readonly' => '',
                '$yourmessage' => L10n::t('Your message:'),
-               '$select' => $select,
                '$parent' => '',
                '$upload' => L10n::t('Upload photo'),
                '$insert' => L10n::t('Insert web link'),