X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Fwallmessage.php;h=d4988aa0cae385a7a73bb007d4bc64ebb49edf05;hb=6b03ee29229e1c56e1ba71fb3ff062fa4f1ce51a;hp=3f9d24ac35cffd65b1b3b19fd2c754a852b86672;hpb=6730430919a8c2d93f70397d9a2d4374a5001653;p=friendica.git diff --git a/mod/wallmessage.php b/mod/wallmessage.php index 3f9d24ac35..d4988aa0ca 100644 --- a/mod/wallmessage.php +++ b/mod/wallmessage.php @@ -27,6 +27,7 @@ use Friendica\DI; use Friendica\Model\Mail; use Friendica\Model\Profile; use Friendica\Model\User; +use Friendica\Util\DateTimeFormat; use Friendica\Util\Strings; function wallmessage_post(App $a) { @@ -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;