X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Fwallmessage.php;h=e8f7d24e31e37abc4b2e45d60537a389972bbbbc;hb=314431507da53469fe0bcf79b4b31ad362186db9;hp=6e0ea0caf2019d720e55ceeef5019fffc39bf898;hpb=6668591afecb314a59105b06a1712643f1616636;p=friendica.git diff --git a/mod/wallmessage.php b/mod/wallmessage.php index 6e0ea0caf2..e8f7d24e31 100644 --- a/mod/wallmessage.php +++ b/mod/wallmessage.php @@ -1,6 +1,6 @@ getArgc() > 1) ? Strings::escapeTags(DI::args()->getArgv()[1]) : ''); + $recipient = ((DI::args()->getArgc() > 1) ? DI::args()->getArgv()[1] : ''); if ((! $recipient) || (! $body)) { return; } @@ -56,7 +57,7 @@ function wallmessage_post(App $a) { return; } - $total = DBA::count('mail', ["`uid` = ? AND `created` > UTC_TIMESTAMP() - INTERVAL 1 DAY AND `unknown`", $user['uid']]); + $total = DBA::count('mail', ["`uid` = ? AND `created` > ? AND `unknown`", $user['uid'], DateTimeFormat::utc('now - 1 day')]); if ($total > $user['cntunkmail']) { notice(DI::l10n()->t('Number of daily wall messages for %s exceeded. Message failed.', $user['username'])); return; @@ -110,7 +111,7 @@ function wallmessage_content(App $a) { return; } - $total = DBA::count('mail', ["`uid` = ? AND `created` > UTC_TIMESTAMP() - INTERVAL 1 DAY AND `unknown`", $user['uid']]); + $total = DBA::count('mail', ["`uid` = ? AND `created` > ? AND `unknown`", $user['uid'], DateTimeFormat::utc('now - 1 day')]); if ($total > $user['cntunkmail']) { notice(DI::l10n()->t('Number of daily wall messages for %s exceeded. Message failed.', $user['username'])); return;