mirror of
https://github.com/slawkens/myaac.git
synced 2025-05-15 10:29:20 +02:00
Do not return -1 in case of freePremium, makes things harder
This commit is contained in:
parent
5367df2381
commit
3befde2a1e
@ -443,9 +443,6 @@ class OTS_Account extends OTS_Row_DAO implements IteratorAggregate, Countable
|
|||||||
throw new E_OTS_NotLoaded();
|
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'])) {
|
if(isset($this->data['premium_ends_at']) || isset($this->data['premend'])) {
|
||||||
$col = isset($this->data['premium_ends_at']) ? 'premium_ends_at' : 'premend';
|
$col = isset($this->data['premium_ends_at']) ? 'premium_ends_at' : 'premend';
|
||||||
$ret = ceil(($this->data[$col] - time()) / (24 * 60 * 60));
|
$ret = ceil(($this->data[$col] - time()) / (24 * 60 * 60));
|
||||||
|
@ -43,9 +43,6 @@ class Account extends Model {
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
global $config;
|
|
||||||
if(isset($config['lua']['freePremium']) && getBoolean($config['lua']['freePremium'])) return -1;
|
|
||||||
|
|
||||||
if($this->premdays == 65535){
|
if($this->premdays == 65535){
|
||||||
return 65535;
|
return 65535;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user