Replaced argv/argc with replacement functions

This commit is contained in:
Michael 2021-07-25 13:08:22 +00:00
parent 9cc4682e0a
commit 0c0abd9238
23 changed files with 136 additions and 138 deletions

View file

@ -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.'));