Version 4.5.0

This commit is contained in:
Neo committed 2025-12-19 05:51:58 -08:00
1 parent 1a0c7fd3c2
commit f79dcf067a
3791 files changed
+248032 -76372

No files matched your search

@@ -12,7 +12,7 @@
namespace IPS\nexus\Form;
/* To prevent PHP errors (extending class does not exist) revealing path */
if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
{
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
exit;
@@ -33,6 +33,8 @@ class _CreditCard extends \IPS\Helpers\Form\FormAbstract
'attr' => array(...), // Will wrap fields in a div with the specified attributes
'jsRequired'=> FALSE, // If true, will add an error in <noscript> tags
'names' => TRUE, // Sets if name="" attributes should be on the fields (for gateways that use JS, this avoids details hitting the server)
'dummy' => TRUE, // If TRUE, will create <div>s rather than actual input boxes which is needed for some gateways
'loading' => TRUE, // If TRUE, will apply a loading filter over the new card input area in case you have any extra JS that needs to be set up
);
* @endcode
*/
@@ -44,6 +46,8 @@ class _CreditCard extends \IPS\Helpers\Form\FormAbstract
'jsRequired'=> FALSE,
'names' => TRUE,
'dummy' => FALSE,
'disabled' => FALSE,
'loading' => FALSE
);
/**
@@ -59,7 +63,7 @@ class _CreditCard extends \IPS\Helpers\Form\FormAbstract
$expMonth = NULL;
$expYear = NULL;
$ccv = '';
if ( is_array( $this->value ) )
if ( \is_array( $this->value ) )
{
$number = $this->value['number'];
$expMonth = $this->value['exp_month'];
@@ -95,12 +99,13 @@ class _CreditCard extends \IPS\Helpers\Form\FormAbstract
}
}
return \IPS\Theme::i()->getTemplate( 'forms', 'nexus', 'global' )->creditCard( $this, $types, $number, intval( $expMonth ), intval( $expYear ), $ccv, $storedCards );
return \IPS\Theme::i()->getTemplate( 'forms', 'nexus', 'global' )->creditCard( $this, $types, $number, \intval( $expMonth ), \intval( $expYear ), $ccv, $storedCards );
}
/**
* Get HTML
*
* @param \IPS\Helpers\Form|null $form Form helper object
* @return string
*/
public function rowHtml( $form=NULL )
@@ -183,7 +188,7 @@ class _CreditCard extends \IPS\Helpers\Form\FormAbstract
{
if ( $this->value instanceof \IPS\nexus\CreditCard )
{
if ( $this->value->type and !in_array( $this->value->type, $this->options['types'] ) )
if ( $this->value->type and !\in_array( $this->value->type, $this->options['types'] ) )
{
throw new \LogicException( \IPS\Member::loggedIn()->language()->addToStack( 'card_bad_type', FALSE, array( 'sprintf' => array( \IPS\Member::loggedIn()->language()->addToStack( "card_type_" . $this->value->type ) ) ) ) );
}