mirror of
https://github.com/Znote/ZnoteAAC.git
synced 2025-10-19 12:23:27 +02:00
More accurate premium duration calculation.
Dont skimp on the hours on the last day the premium expires.
This commit is contained in:
@@ -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}';
|
||||||
");
|
");
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user