Version 4.7.23
This commit is contained in:
1 parent
7124a02564
commit
25ddeb65d6
1791 files changed
+76990
-44452
No files matched your search
@@ -12,6 +12,11 @@
|
||||
namespace IPS\nexus\modules\admin\payments;
|
||||
|
||||
/* To prevent PHP errors (extending class does not exist) revealing path */
|
||||
|
||||
use IPS\Lang;
|
||||
use IPS\Member;
|
||||
use function in_array;
|
||||
|
||||
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
{
|
||||
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
|
||||
@@ -85,7 +90,7 @@ class _currencies extends \IPS\Dispatcher\Controller
|
||||
'default' => $defaults
|
||||
);
|
||||
|
||||
if ( !\in_array( $code, array( 'AED', 'AFN', 'ALL', 'AMD', 'ANG', 'AOA', 'ARS', 'AUD', 'AWG', 'AZN', 'BAM', 'BBD', 'BDT', 'BGN', 'BHD', 'BIF', 'BMD', 'BND', 'BOB', 'BRL', 'BSD', 'BTN', 'BWP', 'BYN', 'BYR', 'BZD', 'CAD', 'CDF', 'CHF', 'CLF', 'CLP', 'CNY', 'COP', 'CRC', 'CUC', 'CUP', 'CVE', 'CZK', 'DJF', 'DKK', 'DOP', 'DZD', 'EGP', 'ERN', 'ETB', 'EUR', 'FJD', 'FKP', 'GBP', 'GEL', 'GGP', 'GHS', 'GIP', 'GMD', 'GNF', 'GTQ', 'GYD', 'HKD', 'HNL', 'HRK', 'HTG', 'HUF', 'IDR', 'ILS', 'IMP', 'INR', 'IQD', 'IRR', 'ISK', 'JEP', 'JMD', 'JOD', 'JPY', 'KES', 'KGS', 'KHR', 'KMF', 'KPW', 'KRW', 'KWD', 'KYD', 'KZT', 'LAK', 'LBP', 'LKR', 'LRD', 'LSL', 'LYD', 'MAD', 'MDL', 'MGA', 'MKD', 'MMK', 'MNT', 'MOP', 'MRO', 'MUR', 'MVR', 'MWK', 'MXN', 'MYR', 'MZN', 'NAD', 'NGN', 'NIO', 'NOK', 'NPR', 'NZD', 'OMR', 'PAB', 'PEN', 'PGK', 'PHP', 'PKR', 'PLN', 'PYG', 'QAR', 'RON', 'RSD', 'RUB', 'RWF', 'SAR', 'SBD', 'SCR', 'SDG', 'SEK', 'SGD', 'SHP', 'SLL', 'SOS', 'SPL*', 'SRD', 'STD', 'SVC', 'SYP', 'SZL', 'THB', 'TJS', 'TMT', 'TND', 'TOP', 'TRY', 'TTD', 'TVD', 'TWD', 'TZS', 'UAH', 'UGX', 'USD', 'UYU', 'UZS', 'VEF', 'VND', 'VUV', 'WST', 'XAF', 'XCD', 'XDR', 'XOF', 'XPF', 'YER', 'ZAR', 'ZMW', 'ZWD' ) ) )
|
||||
if ( !in_array( $code, array( 'AED', 'AFN', 'ALL', 'AMD', 'ANG', 'AOA', 'ARS', 'AUD', 'AWG', 'AZN', 'BAM', 'BBD', 'BDT', 'BGN', 'BHD', 'BIF', 'BMD', 'BND', 'BOB', 'BRL', 'BSD', 'BTN', 'BWP', 'BYN', 'BYR', 'BZD', 'CAD', 'CDF', 'CHF', 'CLF', 'CLP', 'CNY', 'COP', 'CRC', 'CUC', 'CUP', 'CVE', 'CZK', 'DJF', 'DKK', 'DOP', 'DZD', 'EGP', 'ERN', 'ETB', 'EUR', 'FJD', 'FKP', 'GBP', 'GEL', 'GGP', 'GHS', 'GIP', 'GMD', 'GNF', 'GTQ', 'GYD', 'HKD', 'HNL', 'HRK', 'HTG', 'HUF', 'IDR', 'ILS', 'IMP', 'INR', 'IQD', 'IRR', 'ISK', 'JEP', 'JMD', 'JOD', 'JPY', 'KES', 'KGS', 'KHR', 'KMF', 'KPW', 'KRW', 'KWD', 'KYD', 'KZT', 'LAK', 'LBP', 'LKR', 'LRD', 'LSL', 'LYD', 'MAD', 'MDL', 'MGA', 'MKD', 'MMK', 'MNT', 'MOP', 'MRO', 'MUR', 'MVR', 'MWK', 'MXN', 'MYR', 'MZN', 'NAD', 'NGN', 'NIO', 'NOK', 'NPR', 'NZD', 'OMR', 'PAB', 'PEN', 'PGK', 'PHP', 'PKR', 'PLN', 'PYG', 'QAR', 'RON', 'RSD', 'RUB', 'RWF', 'SAR', 'SBD', 'SCR', 'SDG', 'SEK', 'SGD', 'SHP', 'SLL', 'SOS', 'SPL*', 'SRD', 'STD', 'SVC', 'SYP', 'SZL', 'THB', 'TJS', 'TMT', 'TND', 'TOP', 'TRY', 'TTD', 'TVD', 'TWD', 'TZS', 'UAH', 'UGX', 'USD', 'UYU', 'UZS', 'VEF', 'VND', 'VUV', 'WST', 'XAF', 'XCD', 'XDR', 'XOF', 'XPF', 'YER', 'ZAR', 'ZMW', 'ZWD' ) ) )
|
||||
{
|
||||
$warnings .= \IPS\Theme::i()->getTemplate( 'global', 'core', 'global' )->message( \IPS\Member::loggedIn()->language()->addToStack( 'currency_code_invalid', FALSE, array( 'sprintf' => array( $code ) ) ), 'warning' );
|
||||
}
|
||||
@@ -98,7 +103,14 @@ class _currencies extends \IPS\Dispatcher\Controller
|
||||
'default' => \count( $languages ) === 1 ? TRUE : array_keys( $languages )
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
$currencies = json_decode( \IPS\Settings::i()->nexus_currency, true );
|
||||
if( empty( $currencies ) )
|
||||
{
|
||||
$currencies = \IPS\Settings::i()->nexus_currency;
|
||||
}
|
||||
$errors = $this->_checkCurrencies( $currencies );
|
||||
|
||||
if ( $values = $matrix->values() )
|
||||
{
|
||||
$save = array();
|
||||
@@ -121,28 +133,83 @@ class _currencies extends \IPS\Dispatcher\Controller
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
\IPS\Settings::i()->changeValues( array( 'nexus_currency' => json_encode( $save ) ) );
|
||||
|
||||
foreach ( $definition['columns'] AS $key => $value )
|
||||
/* Sanity check the final result */
|
||||
$errors = $this->_checkCurrencies( $save );
|
||||
if( !$errors )
|
||||
{
|
||||
if ( $key === 'id' )
|
||||
\IPS\Settings::i()->changeValues( array( 'nexus_currency' => json_encode( $save ) ) );
|
||||
|
||||
foreach ( $definition['columns'] AS $key => $value )
|
||||
{
|
||||
continue;
|
||||
if ( $key === 'id' )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
if ( !isset( $save[$key] ) )
|
||||
{
|
||||
\IPS\Db::i()->dropColumn( 'nexus_package_base_prices', $key );
|
||||
}
|
||||
}
|
||||
|
||||
if ( !isset( $save[$key] ) )
|
||||
|
||||
\IPS\Session::i()->log( 'acplogs__currencies' );
|
||||
|
||||
\IPS\Output::i()->redirect( \IPS\Http\Url::internal( 'app=nexus&module=payments&controller=paymentsettings&tab=currencies' ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Clear the elements from the matrix so that they are forced to rebuild.
|
||||
Otherwise, it hides the last row in the table */
|
||||
$matrix->elements = null;
|
||||
}
|
||||
}
|
||||
|
||||
\IPS\Output::i()->output = $errors . $matrix . $warnings;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sanity check on currency settings
|
||||
*
|
||||
* @param array|string $values
|
||||
* @return string
|
||||
*/
|
||||
protected function _checkCurrencies( array|string $values ) : string
|
||||
{
|
||||
$errors = '';
|
||||
|
||||
/* If we have a string here, then we're good to go, we only have one currency */
|
||||
if( \is_string( $values ) )
|
||||
{
|
||||
return $errors;
|
||||
}
|
||||
|
||||
$languages = Lang::languages();
|
||||
|
||||
foreach( array_keys( $languages ) as $langId )
|
||||
{
|
||||
$langUsed = 0;
|
||||
foreach( $values as $code => $defaults )
|
||||
{
|
||||
if( in_array( $langId, $defaults ) )
|
||||
{
|
||||
\IPS\Db::i()->dropColumn( 'nexus_package_base_prices', $key );
|
||||
$langUsed++;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
\IPS\Session::i()->log( 'acplogs__currencies' );
|
||||
|
||||
\IPS\Output::i()->redirect( \IPS\Http\Url::internal( 'app=nexus&module=payments&controller=paymentsettings&tab=currencies' ) );
|
||||
/* If the language doesn't have a default, throw an error */
|
||||
if( !$langUsed )
|
||||
{
|
||||
$errors .= \IPS\Theme::i()->getTemplate( 'global', 'core', 'global' )->message( \IPS\Member::loggedIn()->language()->addToStack( 'currency_code_lang_missing', FALSE, array( 'sprintf' => array( $languages[ $langId ]->_title ) ) ), 'error' );
|
||||
}
|
||||
|
||||
/* A language can't have more than one default */
|
||||
if( $langUsed > 1 )
|
||||
{
|
||||
$errors .= \IPS\Theme::i()->getTemplate( 'global', 'core', 'global' )->message( \IPS\Member::loggedIn()->language()->addToStack( 'currency_code_multiple_default', false, array( 'sprintf' => array( $languages[ $langId ]->_title ) ) ), 'error' );
|
||||
}
|
||||
}
|
||||
|
||||
\IPS\Output::i()->output = $matrix . $warnings;
|
||||
|
||||
return $errors;
|
||||
}
|
||||
}
|
||||
@@ -1185,9 +1185,12 @@ class _invoices extends \IPS\Dispatcher\Controller
|
||||
catch( \Exception $e ) {}
|
||||
}
|
||||
}
|
||||
|
||||
$invoice->sendNotification();
|
||||
|
||||
|
||||
if ( $data['status'] !== \IPS\nexus\Invoice::STATUS_CANCELED )
|
||||
{
|
||||
$invoice->sendNotification();
|
||||
}
|
||||
|
||||
\IPS\Output::i()->redirect( $invoice->acpUrl() );
|
||||
}
|
||||
elseif ( isset( \IPS\Request::i()->remove ) )
|
||||
|
||||
@@ -268,7 +268,7 @@ class _subscriptions extends \IPS\Node\Controller
|
||||
}
|
||||
|
||||
/* If not, just handle the delete as normal */
|
||||
return parent::delete();
|
||||
return parent::delete();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -294,7 +294,7 @@ class _subscriptions extends \IPS\Node\Controller
|
||||
$package->enabled = FALSE;
|
||||
$package->save();
|
||||
|
||||
\IPS\Settings::i()->log( 'aplogs__nexus_sub_hidden', array( "nexus_subs_{$sub->id}" => TRUE ) );
|
||||
\IPS\Session::i()->log( 'aplogs__nexus_sub_hidden', array( "nexus_subs_{$package->id}" => TRUE ) );
|
||||
|
||||
/* Redirect */
|
||||
\IPS\Output::i()->redirect( \IPS\Http\Url::internal( "app=nexus&module=subscriptions&controller=subscriptions" ) );
|
||||
@@ -337,12 +337,15 @@ class _subscriptions extends \IPS\Node\Controller
|
||||
switch ( $newOption['unit'] )
|
||||
{
|
||||
case 'd':
|
||||
$initialTerm = \IPS\Member::loggedIn()->language()->addToStack('renew_days_no_term', FALSE, array( 'pluralize' => array( $newOption['term'] ) ) );
|
||||
$term = \IPS\Member::loggedIn()->language()->addToStack('renew_days', FALSE, array( 'pluralize' => array( $newOption['term'] ) ) );
|
||||
break;
|
||||
case 'm':
|
||||
$initialTerm = \IPS\Member::loggedIn()->language()->addToStack('renew_months_no_term', FALSE, array( 'pluralize' => array( $newOption['term'] ) ) );
|
||||
$term = \IPS\Member::loggedIn()->language()->addToStack('renew_months', FALSE, array( 'pluralize' => array( $newOption['term'] ) ) );
|
||||
break;
|
||||
case 'y':
|
||||
$initialTerm = \IPS\Member::loggedIn()->language()->addToStack('renew_years_no_term', FALSE, array( 'pluralize' => array( $newOption['term'] ) ) );
|
||||
$term = \IPS\Member::loggedIn()->language()->addToStack('renew_years', FALSE, array( 'pluralize' => array( $newOption['term'] ) ) );
|
||||
break;
|
||||
}
|
||||
@@ -350,7 +353,7 @@ class _subscriptions extends \IPS\Node\Controller
|
||||
$form->add( new \IPS\Helpers\Form\Radio( 'nexus_subs_free_period', NULL, TRUE, [
|
||||
'options' => [
|
||||
0 => 'nexus_subs_forever',
|
||||
1 => \IPS\Member::loggedIn()->language()->addToStack( 'nexus_subs_until_renew', FALSE, [ 'sprintf' => [ $newOption['term'], $term, \IPS\Member::loggedIn()->language()->formatList( $costs, \IPS\Member::loggedIn()->language()->get('or_list_format') ), $term ] ] )
|
||||
1 => \IPS\Member::loggedIn()->language()->addToStack( 'nexus_subs_until_renew', FALSE, [ 'sprintf' => [ $newOption['term'], $initialTerm, \IPS\Member::loggedIn()->language()->formatList( $costs, \IPS\Member::loggedIn()->language()->get('or_list_format') ), $term ] ] )
|
||||
]
|
||||
] ) );
|
||||
}
|
||||
@@ -358,7 +361,7 @@ class _subscriptions extends \IPS\Node\Controller
|
||||
if ( $values = $form->values() )
|
||||
{
|
||||
$customer = \IPS\nexus\Customer::load( $values['nexus_subs_member_to_add']->member_id );
|
||||
$sub = \IPS\nexus\Subscription\Package::load( \IPS\Request::i()->id )->addMember( $customer, TRUE, (bool) $values['nexus_subs_free_period'] );
|
||||
$sub = \IPS\nexus\Subscription\Package::load( \IPS\Request::i()->id )->addMember( $customer, TRUE, isset( $values[ 'nexus_subs_free_period' ] ) && (bool) $values[ 'nexus_subs_free_period' ] );
|
||||
$sub->added_manually = 1;
|
||||
$sub->save();
|
||||
|
||||
|
||||
@@ -1320,23 +1320,27 @@ class _checkout extends \IPS\Dispatcher\Controller
|
||||
$canUseAccountCredit = FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
/* Remove any payment methods that can't be used for this transaction */
|
||||
foreach ( $paymentMethods as $gateway )
|
||||
{
|
||||
if ( !$gateway->checkValidity( $amountToPay, $this->invoice->billaddress, \IPS\nexus\Customer::loggedIn()->member_id ? \IPS\nexus\Customer::loggedIn() : \IPS\nexus\Customer::constructFromData( $this->invoice->guest_data['member'] ), $recurrings ) )
|
||||
{
|
||||
unset( $paymentMethods[ $gateway->id ] );
|
||||
}
|
||||
}
|
||||
|
||||
/* Figure out which payment methods are available for card payments */
|
||||
$cardPaymentMethodIds = array_intersect( array_keys( $paymentMethods ), array_keys( \IPS\nexus\Gateway::cardStorageGateways() ) );
|
||||
|
||||
/* If there's something to pay, show a form for it... */
|
||||
$paymentType = NULL;
|
||||
$hiddenValues = array();
|
||||
$showSubmitButton = FALSE;
|
||||
if ( $amountToPay->amount->isGreaterThanZero() )
|
||||
{
|
||||
$paymentType = 'pay';
|
||||
|
||||
/* Remove any payment methods that can't be used for this transaction */
|
||||
foreach ( $paymentMethods as $gateway )
|
||||
{
|
||||
if ( !$gateway->checkValidity( $amountToPay, $this->invoice->billaddress, \IPS\nexus\Customer::loggedIn()->member_id ? \IPS\nexus\Customer::loggedIn() : \IPS\nexus\Customer::constructFromData( $this->invoice->guest_data['member'] ), $recurrings ) )
|
||||
{
|
||||
unset( $paymentMethods[ $gateway->id ] );
|
||||
}
|
||||
}
|
||||
|
||||
/* If we don't have any available payment methods, show an error */
|
||||
if ( \count( $paymentMethods ) === 0 and !$amountToPay->amount->isZero() )
|
||||
{
|
||||
@@ -1346,7 +1350,6 @@ class _checkout extends \IPS\Dispatcher\Controller
|
||||
/* Build form */
|
||||
$elements = array();
|
||||
$paymentMethodsToggles = array();
|
||||
$showSubmitButton = FALSE;
|
||||
foreach ( $paymentMethods as $gateway )
|
||||
{
|
||||
foreach ( $gateway->paymentScreen( $this->invoice, $amountToPay, NULL, $recurrings ) as $element )
|
||||
@@ -1388,7 +1391,7 @@ class _checkout extends \IPS\Dispatcher\Controller
|
||||
}
|
||||
}
|
||||
/* If there's nothing to pay now, but there will be something to pay later... if we DON'T have any stored payment methods, we may be able to prompt the user to create one */
|
||||
elseif ( $recurrings and array_intersect( array_keys( $paymentMethods ), array_keys( \IPS\nexus\Gateway::cardStorageGateways() ) ) and !\IPS\Db::i()->select( 'COUNT(*)', 'nexus_customer_cards', array( 'card_member=?', \IPS\nexus\Customer::loggedIn()->member_id ) )->first() and $elements = \IPS\nexus\Customer\CreditCard::createFormElements( \IPS\nexus\Customer::loggedIn(), FALSE, $showSubmitButton, $hiddenValues ) )
|
||||
elseif ( $recurrings and $cardPaymentMethodIds and !\IPS\Db::i()->select( 'COUNT(*)', 'nexus_customer_cards', array( array( 'card_member=?', \IPS\nexus\Customer::loggedIn()->member_id ), array( \IPS\Db::i()->in( 'card_method', $cardPaymentMethodIds ) ) ) )->first() and $elements = \IPS\nexus\Customer\CreditCard::createFormElements( \IPS\nexus\Customer::loggedIn(), FALSE, $showSubmitButton, $hiddenValues, $cardPaymentMethodIds ) )
|
||||
{
|
||||
$paymentType = 'card';
|
||||
}
|
||||
|
||||
@@ -63,7 +63,7 @@ class _invoices extends \IPS\Dispatcher\Controller
|
||||
}
|
||||
|
||||
/* Do not cache this guest view invoice */
|
||||
\IPS\Output::i()->pageCaching = FALSE;
|
||||
\IPS\Output::setCacheTime( false );
|
||||
}
|
||||
|
||||
\IPS\Output::i()->breadcrumb[] = array( \IPS\Http\Url::internal( 'app=nexus&module=clients&controller=invoices', 'front', 'clientsinvoices' ), \IPS\Member::loggedIn()->language()->addToStack('client_invoices') );
|
||||
|
||||
@@ -42,8 +42,8 @@ class _product extends \IPS\Content\Controller
|
||||
{
|
||||
\IPS\Output::i()->cssFiles = array_merge( \IPS\Output::i()->cssFiles, \IPS\Theme::i()->css( 'store_responsive.css', 'nexus', 'front' ) );
|
||||
}
|
||||
|
||||
\IPS\Output::i()->pageCaching = FALSE;
|
||||
|
||||
\IPS\Output::setCacheTime( false );
|
||||
|
||||
parent::execute();
|
||||
}
|
||||
|
||||
@@ -46,7 +46,7 @@ class _store extends \IPS\Dispatcher\Controller
|
||||
{
|
||||
\IPS\Output::i()->cssFiles = array_merge( \IPS\Output::i()->cssFiles, \IPS\Theme::i()->css( 'store_responsive.css', 'nexus', 'front' ) );
|
||||
}
|
||||
|
||||
|
||||
/* Work out currency */
|
||||
if ( isset( \IPS\Request::i()->currency ) and \in_array( \IPS\Request::i()->currency, \IPS\nexus\Money::currencies() ) )
|
||||
{
|
||||
@@ -63,8 +63,8 @@ class _store extends \IPS\Dispatcher\Controller
|
||||
{
|
||||
$this->currency = \IPS\nexus\Customer::loggedIn()->defaultCurrency();
|
||||
}
|
||||
|
||||
\IPS\Output::i()->pageCaching = FALSE;
|
||||
|
||||
\IPS\Output::setCacheTime( false );
|
||||
|
||||
/* Pass up */
|
||||
parent::execute();
|
||||
@@ -129,6 +129,7 @@ class _store extends \IPS\Dispatcher\Controller
|
||||
$url = $url->setQueryString( 'filter', \IPS\Request::i()->filter );
|
||||
foreach ( \IPS\Request::i()->filter as $filterId => $allowedValues )
|
||||
{
|
||||
$filterId = (int) $filterId;
|
||||
$where[] = array( \IPS\Db::i()->findInSet( "filter{$filterId}.pfm_values", array_map( 'intval', explode( ',', $allowedValues ) ) ) );
|
||||
$joins[] = array( 'table' => array( 'nexus_package_filters_map', "filter{$filterId}" ), 'on' => array( "filter{$filterId}.pfm_package=p_id AND filter{$filterId}.pfm_filter=?", $filterId ) );
|
||||
}
|
||||
@@ -387,6 +388,7 @@ class _store extends \IPS\Dispatcher\Controller
|
||||
|
||||
/* Display */
|
||||
\IPS\Output::i()->sidebar['contextual'] = \IPS\Theme::i()->getTemplate('store')->categorySidebar( );
|
||||
\IPS\Output::i()->linkTags['canonical'] = (string) \IPS\Http\Url::internal( 'app=nexus&module=store&controller=store', 'front', 'store' );
|
||||
\IPS\Output::i()->output = \IPS\Theme::i()->getTemplate('store')->index( \IPS\nexus\Customer::loggedIn()->cm_credits[ $this->currency ], $newProducts, $popularProducts );
|
||||
\IPS\Output::i()->title = \IPS\Member::loggedIn()->language()->addToStack('module__nexus_store');
|
||||
}
|
||||
|
||||
@@ -65,7 +65,7 @@ class _subscriptions extends \IPS\Dispatcher\Controller
|
||||
}
|
||||
|
||||
/* Send no-cache headers for this page, required for guest sign-ups */
|
||||
\IPS\Output::i()->pageCaching = FALSE;
|
||||
\IPS\Output::setCacheTime( false );
|
||||
|
||||
/* Create the table */
|
||||
$table = new \IPS\nexus\Subscription\Table( \IPS\Http\Url::internal( 'app=nexus&module=subscriptions&controller=subscriptions', 'front', 'nexus_subscriptions' ) );
|
||||
@@ -94,6 +94,7 @@ class _subscriptions extends \IPS\Dispatcher\Controller
|
||||
|
||||
\IPS\Output::i()->breadcrumb['module'] = array( \IPS\Http\Url::internal( 'app=nexus&module=subscriptions&controller=subscriptions', 'front', 'nexus_subscriptions' ), \IPS\Member::loggedIn()->language()->addToStack('nexus_front_subscriptions') );
|
||||
|
||||
\IPS\Output::i()->linkTags['canonical'] = (string) \IPS\Http\Url::internal( 'app=nexus&module=subscriptions&controller=subscriptions', 'front', 'nexus_subscriptions' );
|
||||
\IPS\Output::i()->title = \IPS\Member::loggedIn()->language()->addToStack('nexus_front_subscriptions');
|
||||
\IPS\Output::i()->output = $table;
|
||||
}
|
||||
@@ -188,7 +189,7 @@ class _subscriptions extends \IPS\Dispatcher\Controller
|
||||
\IPS\Session::i()->csrfCheck();
|
||||
|
||||
/* Send no-cache headers for this page, required for guest sign-ups */
|
||||
\IPS\Output::i()->pageCaching = FALSE;
|
||||
\IPS\Output::setCacheTime( false );
|
||||
|
||||
/* Already purchased a subscription */
|
||||
if ( $current = \IPS\nexus\Subscription::loadByMember( \IPS\nexus\Customer::loggedIn(), FALSE ) AND ( $current->purchase AND ( !$current->purchase->cancelled OR $current->purchase->can_reactivate ) ) )
|
||||
|
||||
Reference in new issue
Block a user