Version 5.0.0 beta 1

This commit is contained in:
Neo committed 2025-12-19 16:27:35 -08:00
1 parent 25ddeb65d6
commit 15c7beabc5
6736 files changed
+627902 -497943

No files matched your search

@@ -12,21 +12,30 @@
namespace IPS\nexus\modules\admin\payments;
/* To prevent PHP errors (extending class does not exist) revealing path */
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
use IPS\Dispatcher\Controller;
use IPS\Http\Url;
use IPS\Member;
use IPS\Output;
use IPS\Request;
use IPS\Theme;
use function defined;
if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
{
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
header( ( $_SERVER['SERVER_PROTOCOL'] ?? 'HTTP/1.0' ) . ' 403 Forbidden' );
exit;
}
/**
* Payment Settings
*/
class _paymentsettings extends \IPS\Dispatcher\Controller
class paymentsettings extends Controller
{
/**
* @brief Has been CSRF-protected
*/
public static $csrfProtected = TRUE;
public static bool $csrfProtected = TRUE;
/**
* Call
@@ -36,38 +45,34 @@ class _paymentsettings extends \IPS\Dispatcher\Controller
public function __call( $method, $args )
{
$tabs = array();
if( \IPS\Member::loggedIn()->hasAcpRestriction( 'nexus', 'payments', 'currencies_manage' ) )
if( Member::loggedIn()->hasAcpRestriction( 'nexus', 'payments', 'currencies_manage' ) )
{
$tabs['currencies'] = 'currencies';
}
if( \IPS\Member::loggedIn()->hasAcpRestriction( 'nexus', 'payments', 'gateways_manage' ) )
if( Member::loggedIn()->hasAcpRestriction( 'nexus', 'payments', 'gateways_manage' ) )
{
$tabs['gateways'] = 'payment_methods';
}
if( \IPS\Member::loggedIn()->hasAcpRestriction( 'nexus', 'payments', 'tax_manage' ) )
if( Member::loggedIn()->hasAcpRestriction( 'nexus', 'payments', 'tax_manage' ) )
{
$tabs['tax'] = 'tax_rates';
}
if( \IPS\Member::loggedIn()->hasAcpRestriction( 'nexus', 'payments', 'checkout_settings' ) )
if( Member::loggedIn()->hasAcpRestriction( 'nexus', 'payments', 'checkout_settings' ) )
{
$tabs['checkoutsettings'] = 'checkout_settings';
}
if( \IPS\Member::loggedIn()->hasAcpRestriction( 'nexus', 'payments', 'fraud_manage' ) )
if( Member::loggedIn()->hasAcpRestriction( 'nexus', 'payments', 'fraud_manage' ) )
{
$tabs['fraud'] = 'anti_fraud_rules';
}
if( \IPS\Member::loggedIn()->hasAcpRestriction( 'nexus', 'payments', 'transaction_review_settings' ) )
{
$tabs['review'] = 'transaction_review';
}
if( \IPS\Member::loggedIn()->hasAcpRestriction( 'nexus', 'payments', 'email_copies_settings' ) )
if( Member::loggedIn()->hasAcpRestriction( 'nexus', 'payments', 'email_copies_settings' ) )
{
$tabs['emails'] = 'notification_copies';
}
if ( isset( \IPS\Request::i()->tab ) and isset( $tabs[ \IPS\Request::i()->tab ] ) )
if ( isset( Request::i()->tab ) and isset( $tabs[ Request::i()->tab ] ) )
{
$activeTab = \IPS\Request::i()->tab;
$activeTab = Request::i()->tab;
}
else
{
@@ -77,15 +82,15 @@ class _paymentsettings extends \IPS\Dispatcher\Controller
$classname = 'IPS\nexus\modules\admin\payments\\' . $activeTab;
$class = new $classname;
$class->url = \IPS\Http\Url::internal("app=nexus&module=payments&controller=paymentsettings&tab={$activeTab}");
$class->url = Url::internal("app=nexus&module=payments&controller=paymentsettings&tab={$activeTab}");
$class->execute();
if ( $method !== 'manage' or \IPS\Request::i()->isAjax() )
if ( $method !== 'manage' or Request::i()->isAjax() )
{
return;
}
\IPS\Output::i()->title = \IPS\Member::loggedIn()->language()->addToStack('payment_settings');
\IPS\Output::i()->output = \IPS\Theme::i()->getTemplate( 'global', 'core' )->tabs( $tabs, $activeTab, \IPS\Output::i()->output, \IPS\Http\Url::internal( "app=nexus&module=payments&controller=paymentsettings" ) );
Output::i()->title = Member::loggedIn()->language()->addToStack('payment_settings');
Output::i()->output = Theme::i()->getTemplate( 'global', 'core' )->tabs( $tabs, $activeTab, Output::i()->output, Url::internal( "app=nexus&module=payments&controller=paymentsettings" ) );
}
}