* fiedx bug on othire with config.account_premium_days

* fixed getPremDays and isPremium functions (newest 11.x engines are
bugged when it comes to PACC, its not fault of MyAAC)
This commit is contained in:
slawkens1
2018-01-03 21:03:05 +01:00
parent efb1775aff
commit 3e49ef42a2
3 changed files with 33 additions and 26 deletions

View File

@@ -110,7 +110,7 @@ $errors = array();
$players = array();
$account_players = $account_logged->getPlayersList();
$account_players->orderBy('id');
echo $twig->render('account.management.html.twig', array(
'welcome_message' => $welcome_message,
'recovery_key' => $recovery_key,

View File

@@ -144,8 +144,13 @@ if($save)
}
if($config['account_premium_days'] && $config['account_premium_days'] > 0) {
$new_account->setCustomField('premdays', $config['account_premium_days']);
$new_account->setCustomField('lastday', time());
if(fieldExist('premend', 'accounts')) { // othire
$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($config['account_premium_points']) {