Version 4.5.0
This commit is contained in:
1 parent
1a0c7fd3c2
commit
f79dcf067a
3791 files changed
+248032
-76372
No files matched your search
@@ -12,7 +12,7 @@
|
||||
namespace IPS\nexus\Shipping;
|
||||
|
||||
/* 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;
|
||||
@@ -104,11 +104,11 @@ class _FlatRate extends \IPS\Node\Model implements \IPS\nexus\Shipping\Rate
|
||||
$weightMatrix->columns = array(
|
||||
'w_rate_min'=> function( $key, $value, $data )
|
||||
{
|
||||
return new \IPS\nexus\Form\Weight( $key, ( is_numeric( $value ) ) ? new \IPS\nexus\Shipping\Weight( $value ) : $value, FALSE, array( 'unlimitedLang' => 's_any_value' ) );
|
||||
return new \IPS\nexus\Form\Weight( $key, ( \is_numeric( $value ) ) ? new \IPS\nexus\Shipping\Weight( $value ) : $value, FALSE, array( 'unlimitedLang' => 's_any_value' ) );
|
||||
},
|
||||
'w_rate_max'=> function( $key, $value, $data )
|
||||
{
|
||||
return new \IPS\nexus\Form\Weight( $key, ( is_numeric( $value ) ) ? new \IPS\nexus\Shipping\Weight( $value ) : $value, FALSE, array( 'unlimitedLang' => 's_any_value' ) );
|
||||
return new \IPS\nexus\Form\Weight( $key, ( \is_numeric( $value ) ) ? new \IPS\nexus\Shipping\Weight( $value ) : $value, FALSE, array( 'unlimitedLang' => 's_any_value' ) );
|
||||
},
|
||||
'w_rate_price'=> function( $key, $value, $data )
|
||||
{
|
||||
@@ -293,7 +293,7 @@ class _FlatRate extends \IPS\Node\Model implements \IPS\nexus\Shipping\Rate
|
||||
{
|
||||
$price[ $money->currency ] = $money->amount;
|
||||
}
|
||||
if ( !count( $price ) )
|
||||
if ( !\count( $price ) )
|
||||
{
|
||||
foreach ( \IPS\nexus\Money::currencies() as $currency )
|
||||
{
|
||||
@@ -379,7 +379,7 @@ class _FlatRate extends \IPS\Node\Model implements \IPS\nexus\Shipping\Rate
|
||||
|
||||
if ( isset( $locations[ $destination->country ] ) )
|
||||
{
|
||||
if ( $locations[ $destination->country ] !== '*' and !in_array( $destination->region, $locations[ $destination->country ] ) )
|
||||
if ( $locations[ $destination->country ] !== '*' and !\in_array( $destination->region, $locations[ $destination->country ] ) )
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
@@ -396,12 +396,12 @@ class _FlatRate extends \IPS\Node\Model implements \IPS\nexus\Shipping\Rate
|
||||
foreach ( $rates as $rate )
|
||||
{
|
||||
$min = $rate['min'];
|
||||
if ( is_array( $min ) )
|
||||
if ( \is_array( $min ) )
|
||||
{
|
||||
$min = $min[ $currency ];
|
||||
}
|
||||
$max = $rate['max'];
|
||||
if ( is_array( $max ) )
|
||||
if ( \is_array( $max ) )
|
||||
{
|
||||
$max = $max[ $currency ];
|
||||
}
|
||||
@@ -488,12 +488,12 @@ class _FlatRate extends \IPS\Node\Model implements \IPS\nexus\Shipping\Rate
|
||||
foreach ( $rates as $rate )
|
||||
{
|
||||
$min = $rate['min'];
|
||||
if ( is_array( $min ) )
|
||||
if ( \is_array( $min ) )
|
||||
{
|
||||
$min = $min[ $currency ];
|
||||
}
|
||||
$max = $rate['max'];
|
||||
if ( is_array( $max ) )
|
||||
if ( \is_array( $max ) )
|
||||
{
|
||||
$max = $max[ $currency ];
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user