mirror of
https://git.friendi.ca/friendica/friendica-addons.git
synced 2025-07-07 00:48:55 +00:00
Move Temporal::convert() to DateTimeFormat::convert()
This commit is contained in:
parent
13fb4a312d
commit
1900da6c42
15 changed files with 77 additions and 77 deletions
|
@ -10,7 +10,7 @@ use Friendica\Core\Addon;
|
|||
use Friendica\Core\Config;
|
||||
use Friendica\Core\L10n;
|
||||
use Friendica\Model\User;
|
||||
use Friendica\Util\Temporal;
|
||||
use Friendica\Util\DateTimeFormat;
|
||||
|
||||
function public_server_install() {
|
||||
|
||||
|
@ -39,7 +39,7 @@ function public_server_register_account($a,$b) {
|
|||
return;
|
||||
|
||||
$r = q("UPDATE user set account_expires_on = '%s', expire = %d where uid = %d",
|
||||
dbesc(Temporal::utc('now +' . $days . ' days')),
|
||||
dbesc(DateTimeFormat::utc('now +' . $days . ' days')),
|
||||
intval($days_posts),
|
||||
intval($uid)
|
||||
);
|
||||
|
@ -69,7 +69,7 @@ function public_server_cron($a,$b) {
|
|||
]);
|
||||
|
||||
q("update user set expire_notification_sent = '%s' where uid = %d",
|
||||
dbesc(Temporal::utcNow()),
|
||||
dbesc(DateTimeFormat::utcNow()),
|
||||
intval($rr['uid'])
|
||||
);
|
||||
}
|
||||
|
@ -87,7 +87,7 @@ function public_server_cron($a,$b) {
|
|||
if(count($r)) {
|
||||
foreach($r as $rr)
|
||||
q("update user set account_expires_on = '%s' where uid = %d",
|
||||
dbesc(Temporal::utc('now +' . '6 days')),
|
||||
dbesc(DateTimeFormat::utc('now +' . '6 days')),
|
||||
intval($rr['uid'])
|
||||
);
|
||||
}
|
||||
|
@ -100,7 +100,7 @@ function public_server_cron($a,$b) {
|
|||
if(count($r)) {
|
||||
foreach($r as $rr)
|
||||
q("update user set account_expires_on = '%s' where uid = %d",
|
||||
dbesc(Temporal::utc('now +' . '6 days')),
|
||||
dbesc(DateTimeFormat::utc('now +' . '6 days')),
|
||||
intval($rr['uid'])
|
||||
);
|
||||
}
|
||||
|
@ -138,7 +138,7 @@ function public_server_login($a,$b) {
|
|||
if(! $days)
|
||||
return;
|
||||
$r = q("UPDATE user set account_expires_on = '%s' where uid = %d and account_expires_on > '0000-00-00 00:00:00'",
|
||||
dbesc(Temporal::utc('now +' . $days . ' days')),
|
||||
dbesc(DateTimeFormat::utc('now +' . $days . ' days')),
|
||||
local_user()
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue