]> git.mxchange.org Git - friendica.git/blobdiff - mod/wallmessage.php
Merge pull request #10723 from annando/issue-9871-photos
[friendica.git] / mod / wallmessage.php
index cbf53b45d62c39548040409fe465cf3a0a4278f8..cf1bca9cb9d9dc2b8e6e437bbb271750414f6ae3 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /**
- * @copyright Copyright (C) 2020, Friendica
+ * @copyright Copyright (C) 2010-2021, the Friendica project
  *
  * @license GNU AGPL version 3 or any later version
  *
@@ -39,7 +39,7 @@ function wallmessage_post(App $a) {
        $subject   = (!empty($_REQUEST['subject'])   ? Strings::escapeTags(trim($_REQUEST['subject']))   : '');
        $body      = (!empty($_REQUEST['body'])      ? Strings::escapeHtml(trim($_REQUEST['body'])) : '');
 
-       $recipient = (($a->argc > 1) ? Strings::escapeTags($a->argv[1]) : '');
+       $recipient = ((DI::args()->getArgc() > 1) ? Strings::escapeTags(DI::args()->getArgv()[1]) : '');
        if ((! $recipient) || (! $body)) {
                return;
        }
@@ -97,7 +97,7 @@ function wallmessage_content(App $a) {
                return;
        }
 
-       $recipient = (($a->argc > 1) ? $a->argv[1] : '');
+       $recipient = ((DI::args()->getArgc() > 1) ? DI::args()->getArgv()[1] : '');
 
        if (!$recipient) {
                notice(DI::l10n()->t('No recipient.'));