Version 4.3.6
This commit is contained in:
1 parent
fe1acf984a
commit
1a0c7fd3c2
609 files changed
+14707
-5726
No files matched your search
@@ -46,6 +46,21 @@ class _Subscription extends \IPS\Patterns\ActiveRecord
|
||||
{
|
||||
if ( $this->expire )
|
||||
{
|
||||
if ( $this->purchase_id )
|
||||
{
|
||||
/* This has been invoiced, so there is a purchase row - fetch the expiration from that */
|
||||
try
|
||||
{
|
||||
$purchase = \IPS\nexus\Purchase::load( $this->purchase_id );
|
||||
|
||||
if ( $purchase->expire )
|
||||
{
|
||||
return $purchase->expire;
|
||||
}
|
||||
}
|
||||
catch( \OutOfRangeException $e ) { }
|
||||
}
|
||||
|
||||
return \IPS\DateTime::ts( $this->expire );
|
||||
}
|
||||
|
||||
@@ -141,9 +156,9 @@ class _Subscription extends \IPS\Patterns\ActiveRecord
|
||||
*
|
||||
* @param \IPS\Member $member Take a guess
|
||||
* @param \IPS\nexus\Subscription\Package $package I mean it's really writing itself
|
||||
* @param boolean $active Only get active packages
|
||||
* @param boolean $activeOnly Only get active packages
|
||||
* @return \IPS\nexus\Subscription
|
||||
* @throws OutOfRangeException
|
||||
* @throws \OutOfRangeException
|
||||
*/
|
||||
public static function loadByMemberAndPackage( \IPS\Member $member, \IPS\nexus\Subscription\Package $package, $activeOnly = TRUE )
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user