Version 4.7.6
This commit is contained in:
1 parent
8ba7d43898
commit
7b7404e741
1085 files changed
+30590
-7837
No files matched your search
@@ -145,6 +145,7 @@ class _gateways extends \IPS\Node\Controller
|
||||
|
||||
$obj->save();
|
||||
\IPS\Lang::saveCustom( 'nexus', "nexus_paymethod_{$obj->id}", $name );
|
||||
\IPS\Session::i()->log( 'acplogs__nexus_added_gateway', array( "nexus_paymethod_{$obj->id}" => TRUE ) );
|
||||
|
||||
\IPS\Output::i()->redirect( \IPS\Http\Url::internal('app=nexus&module=payments&controller=paymentsettings&tab=gateways') );
|
||||
}
|
||||
|
||||
@@ -85,7 +85,7 @@ class _shippingrates extends \IPS\Node\Controller
|
||||
$allAreZero = TRUE;
|
||||
foreach ( $rate['min'] as $val )
|
||||
{
|
||||
if ( $val !== 0 )
|
||||
if ( (int) $val !== 0 )
|
||||
{
|
||||
$allAreZero = FALSE;
|
||||
}
|
||||
@@ -96,7 +96,7 @@ class _shippingrates extends \IPS\Node\Controller
|
||||
$haveNoLowerLimit = TRUE;
|
||||
}
|
||||
}
|
||||
elseif ( $rate['min'] === 0 )
|
||||
elseif ( (int) $rate['min'] === 0 )
|
||||
{
|
||||
$haveNoLowerLimit = TRUE;
|
||||
}
|
||||
@@ -113,13 +113,13 @@ class _shippingrates extends \IPS\Node\Controller
|
||||
{
|
||||
foreach ( $lastUpper as $k => $v )
|
||||
{
|
||||
if ( \strval( $rate['min'][ $k ] - $v ) > 0.01 ) # @note: We use strval() here to prevent PHP from applying a precision to the float, inadvertently causing this to return TRUE
|
||||
if ( \strval( $rate['min'][ $k ] - $v ) >= 0.02 ) # @note: We use strval() here to prevent PHP from applying a precision to the float, inadvertently causing this to return TRUE
|
||||
{
|
||||
$consecutive = FALSE;
|
||||
}
|
||||
}
|
||||
}
|
||||
elseif ( \strval( $rate['min'] - $lastUpper ) > 0.01 ) # @note: We use strval() here to prevent PHP from applying a precision to the float, inadvertently causing this to return TRUE
|
||||
elseif ( \strval( $rate['min'] - $lastUpper ) >= 0.02 ) # @note: We use strval() here to prevent PHP from applying a precision to the float, inadvertently causing this to return TRUE
|
||||
{
|
||||
$consecutive = FALSE;
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@ class _transactions extends \IPS\Dispatcher\Controller
|
||||
* @brief Has been CSRF-protected
|
||||
*/
|
||||
public static $csrfProtected = TRUE;
|
||||
|
||||
|
||||
/**
|
||||
* Execute
|
||||
*
|
||||
@@ -113,9 +113,9 @@ class _transactions extends \IPS\Dispatcher\Controller
|
||||
\IPS\Output::i()->error( 'node_error', '2X186/9', 404, '' );
|
||||
}
|
||||
$method = $transaction->method;
|
||||
|
||||
|
||||
/* Can we approve it? */
|
||||
if ( !\in_array( $transaction->status, array( \IPS\nexus\Transaction::STATUS_WAITING, \IPS\nexus\Transaction::STATUS_HELD, \IPS\nexus\Transaction::STATUS_REVIEW, \IPS\nexus\Transaction::STATUS_GATEWAY_PENDING, \IPS\nexus\Transaction::STATUS_DISPUTED ) ) )
|
||||
if ( !$method or !\in_array( $transaction->status, array( \IPS\nexus\Transaction::STATUS_WAITING, \IPS\nexus\Transaction::STATUS_HELD, \IPS\nexus\Transaction::STATUS_REVIEW, \IPS\nexus\Transaction::STATUS_GATEWAY_PENDING, \IPS\nexus\Transaction::STATUS_DISPUTED ) ) )
|
||||
{
|
||||
\IPS\Output::i()->error( 'transaction_status_err', '2X186/A', 403, '' );
|
||||
}
|
||||
@@ -561,7 +561,7 @@ class _transactions extends \IPS\Dispatcher\Controller
|
||||
$transaction->member->log( 'transaction', array(
|
||||
'type' => 'delete',
|
||||
'id' => $transaction->id,
|
||||
'method' => $transaction->method->id
|
||||
'method' => $transaction->method ? $transaction->method->id : NULL,
|
||||
) );
|
||||
}
|
||||
}
|
||||
@@ -571,7 +571,7 @@ class _transactions extends \IPS\Dispatcher\Controller
|
||||
}
|
||||
|
||||
/* Redirect */
|
||||
\IPS\Output::i()->redirect( \IPS\Http\Url::internal('app=nexus&module=payments&controller=transactions') );
|
||||
\IPS\Output::i()->redirect( \IPS\Http\Url::internal('app=nexus&module=payments&controller=transactions')->getSafeUrlFromFilters());
|
||||
}
|
||||
|
||||
|
||||
@@ -588,27 +588,27 @@ class _transactions extends \IPS\Dispatcher\Controller
|
||||
switch ( \IPS\Request::i()->r )
|
||||
{
|
||||
case 'v':
|
||||
\IPS\Output::i()->redirect( $transaction->acpUrl() );
|
||||
\IPS\Output::i()->redirect( $transaction->acpUrl()->getSafeUrlFromFilters() );
|
||||
break;
|
||||
|
||||
case 'i':
|
||||
\IPS\Output::i()->redirect( $transaction->invoice->acpUrl() );
|
||||
\IPS\Output::i()->redirect( $transaction->invoice->acpUrl()->getSafeUrlFromFilters() );
|
||||
break;
|
||||
|
||||
case 'c':
|
||||
\IPS\Output::i()->redirect( $transaction->member->acpUrl() );
|
||||
\IPS\Output::i()->redirect( $transaction->member->acpUrl()->getSafeUrlFromFilters());
|
||||
break;
|
||||
|
||||
case 't':
|
||||
\IPS\Output::i()->redirect( \IPS\Http\Url::internal('app=nexus&module=payments&controller=transactions') );
|
||||
\IPS\Output::i()->redirect( \IPS\Http\Url::internal('app=nexus&module=payments&controller=transactions')->getSafeUrlFromFilters() );
|
||||
break;
|
||||
|
||||
case 'n':
|
||||
\IPS\Output::i()->redirect( \IPS\Http\Url::internal('app=core&module=overview&controller=notifications') );
|
||||
\IPS\Output::i()->redirect( \IPS\Http\Url::internal('app=core&module=overview&controller=notifications')->getSafeUrlFromFilters());
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
\IPS\Output::i()->redirect( $transaction->acpUrl() );
|
||||
\IPS\Output::i()->redirect( $transaction->acpUrl()->getSafeUrlFromFilters());
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user