Version 4.7.23
This commit is contained in:
1 parent
7124a02564
commit
25ddeb65d6
1791 files changed
+76990
-44452
No files matched your search
@@ -261,7 +261,7 @@ class _Package extends \IPS\Node\Model
|
||||
{
|
||||
if ( !\in_array( $k, array( 'id', 'reviews', 'unapproved_reviews', 'hidden_reviews' ) ) )
|
||||
{
|
||||
if ( \in_array( "p_{$k}", static::$packageDatabaseColumns ) )
|
||||
if ( isset( static::$packageDatabaseColumns ) and \in_array( "p_{$k}", static::$packageDatabaseColumns ) )
|
||||
{
|
||||
$secondaryTable[ "p_{$k}" ] = $v;
|
||||
}
|
||||
@@ -2574,10 +2574,21 @@ class _Package extends \IPS\Node\Model
|
||||
break;
|
||||
|
||||
case 'reactivate':
|
||||
if( ( $purchase->cancelled AND !$purchase->can_reactivate ) )
|
||||
{
|
||||
\IPS\Output::i()->error( 'package_cannot_reactivate_error', '2S437/1', 403, '' );
|
||||
}
|
||||
|
||||
$currency = $purchase->original_invoice->currency;
|
||||
$renewalOptions = json_decode( $this->renew_options, TRUE );
|
||||
$noOptions = \count( $renewalOptions ) === 1;
|
||||
|
||||
/* Are we able to renew this purchase? */
|
||||
if( $purchase->renewals or !\count( $renewalOptions ) or ( $purchase->billing_agreement and !$purchase->billing_agreement->canceled ) )
|
||||
{
|
||||
\IPS\Output::i()->error( 'package_cannot_reactivate_error', '2S437/2', 403, '' );
|
||||
}
|
||||
|
||||
$tax = NULL;
|
||||
if ( $purchase->tax )
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user