mirror of
https://github.com/slawkens/myaac.git
synced 2025-04-26 01:09:21 +02:00
Merge branch '0.8' of https://github.com/slawkens/myaac into 0.8
This commit is contained in:
commit
01dda11a2f
@ -371,19 +371,19 @@ class OTS_Account extends OTS_Row_DAO implements IteratorAggregate, Countable
|
||||
throw new E_OTS_NotLoaded();
|
||||
}
|
||||
|
||||
$configFreePremium = configLua('freePremium');
|
||||
if(isset($configFreePremium) && getBoolean($configFreePremium)) {return -1;}
|
||||
|
||||
if(isset($this->data['premium_ends_at']) || isset($this->data['premend'])) {
|
||||
$col = isset($this->data['premium_ends_at']) ? 'premium_ends_at' : 'premend';
|
||||
$ret = ceil(($this->data[$col] - time()) / (24 * 60 * 60));
|
||||
return $ret > 0 ? $ret : 0;
|
||||
return max($ret, 0);
|
||||
}
|
||||
|
||||
if($this->data['premdays'] == 0) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
global $config;
|
||||
if(isset($config['lua']['freePremium']) && getBoolean($config['lua']['freePremium'])) return -1;
|
||||
|
||||
if($this->data['premdays'] == self::GRATIS_PREMIUM_DAYS){
|
||||
return self::GRATIS_PREMIUM_DAYS;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user