Version 5.0.0 beta 1
This commit is contained in:
1 parent
25ddeb65d6
commit
15c7beabc5
6736 files changed
+627902
-497943
No files matched your search
@@ -12,30 +12,42 @@
|
||||
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;
|
||||
use IPS\Dispatcher\Controller;
|
||||
use IPS\Helpers\Form;
|
||||
use IPS\Helpers\Form\CheckboxSet;
|
||||
use IPS\Helpers\Form\Stack;
|
||||
use IPS\Http\Url;
|
||||
use IPS\Output;
|
||||
use IPS\Session;
|
||||
use IPS\Settings;
|
||||
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;
|
||||
}
|
||||
|
||||
/**
|
||||
* Notification Copy Settings
|
||||
*/
|
||||
class _emails extends \IPS\Dispatcher\Controller
|
||||
class emails extends Controller
|
||||
{
|
||||
/**
|
||||
* @brief Has been CSRF-protected
|
||||
*/
|
||||
public static $csrfProtected = TRUE;
|
||||
public static bool $csrfProtected = TRUE;
|
||||
|
||||
/**
|
||||
* Execute
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function execute()
|
||||
public function execute() : void
|
||||
{
|
||||
\IPS\Dispatcher::i()->checkAcpPermission( 'email_copies_settings' );
|
||||
Dispatcher::i()->checkAcpPermission( 'email_copies_settings' );
|
||||
parent::execute();
|
||||
}
|
||||
|
||||
@@ -44,10 +56,10 @@ class _emails extends \IPS\Dispatcher\Controller
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function manage()
|
||||
public function manage() : void
|
||||
{
|
||||
$form = new \IPS\Helpers\Form;
|
||||
$form->add( new \IPS\Helpers\Form\CheckboxSet( 'nexus_notify_copy_types', explode( ',', \IPS\Settings::i()->nexus_notify_copy_types ), FALSE, array( 'options' => array(
|
||||
$form = new Form;
|
||||
$form->add( new CheckboxSet( 'nexus_notify_copy_types', explode( ',', Settings::i()->nexus_notify_copy_types ), FALSE, array( 'options' => array(
|
||||
'invoice_warn' => 'nexus_notify_copy_invoice_warn',
|
||||
'new_invoice' => 'nexus_notify_copy_new_invoice',
|
||||
'payment_received' => 'nexus_notify_copy_payment_received',
|
||||
@@ -57,16 +69,16 @@ class _emails extends \IPS\Dispatcher\Controller
|
||||
'payment_refunded' => 'nexus_notify_copy_payment_refunded',
|
||||
'commission_earned' => 'nexus_notify_copy_commission_earned',
|
||||
) ) ) );
|
||||
$form->add( new \IPS\Helpers\Form\Stack( 'nexus_notify_copy_email', explode( ',', \IPS\Settings::i()->nexus_notify_copy_email ) ) );
|
||||
$form->add( new Stack( 'nexus_notify_copy_email', explode( ',', Settings::i()->nexus_notify_copy_email ) ) );
|
||||
|
||||
if ( $form->values() )
|
||||
{
|
||||
$form->saveAsSettings();
|
||||
|
||||
\IPS\Session::i()->log( 'acplogs__email_copies_setting' );
|
||||
\IPS\Output::i()->redirect( \IPS\Http\Url::internal( 'app=nexus&module=payments&controller=paymentsettings&tab=emails' ), 'saved' );
|
||||
Session::i()->log( 'acplogs__email_copies_setting' );
|
||||
Output::i()->redirect( Url::internal( 'app=nexus&module=payments&controller=paymentsettings&tab=emails' ), 'saved' );
|
||||
}
|
||||
|
||||
\IPS\Output::i()->output = $form;
|
||||
Output::i()->output = $form;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user