mirror of
https://github.com/slawkens/myaac.git
synced 2025-05-02 04:09:21 +02:00
fix premium_ends_at for tfs 1.3+
This commit is contained in:
parent
48d561ac6f
commit
1be1bc9178
@ -200,8 +200,13 @@ if($save)
|
||||
$new_account->setCustomField('premend', time() + $config['account_premium_days'] * 86400);
|
||||
}
|
||||
else { // rest
|
||||
$new_account->setCustomField('premdays', $config['account_premium_days']);
|
||||
$new_account->setCustomField('lastday', time());
|
||||
if ($db->hasColumn('accounts', 'premium_ends_at')) { // TFS 1.4+
|
||||
$new_account->setCustomField('premium_ends_at', time() + $config['account_premium_days'] * (60 * 60 * 24));
|
||||
}
|
||||
else {
|
||||
$new_account->setCustomField('premdays', $config['account_premium_days']);
|
||||
$new_account->setCustomField('lastday', time());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user