mirror of
https://github.com/Znote/ZnoteAAC.git
synced 2025-04-30 03:09:22 +02:00
More accurate premium duration calculation.
Dont skimp on the hours on the last day the premium expires.
This commit is contained in:
parent
7fb0916f57
commit
c2cdf5f3bf
@ -889,7 +889,7 @@ function user_account_add_premdays($accid, $days) {
|
|||||||
$days = (int)$days;
|
$days = (int)$days;
|
||||||
mysql_update("
|
mysql_update("
|
||||||
UPDATE `accounts`
|
UPDATE `accounts`
|
||||||
SET `premium_ends_at` = GREATEST(`premium_ends_at`, UNIX_TIMESTAMP(CURDATE())) + ({$days} * 86400)
|
SET `premium_ends_at` = GREATEST(`premium_ends_at`, UNIX_TIMESTAMP()) + ({$days} * 86400)
|
||||||
WHERE `id`='{$accid}';
|
WHERE `id`='{$accid}';
|
||||||
");
|
");
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user