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

+31 -31
View File
@@ -12,7 +12,7 @@
namespace IPS\nexus\setup\upg_40000;
/* 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;
@@ -74,7 +74,7 @@ class _Upgrade
$offset = isset( \IPS\Request::i()->extra ) ? \IPS\Request::i()->extra : 0;
$select = \IPS\Db::i()->select( '*', 'nexus_customers', "cm_address_1<>''", 'member_id', array( $offset, 100 ) );
if ( count( $select ) )
if ( \count( $select ) )
{
foreach ( $select as $customer )
{
@@ -214,7 +214,7 @@ class _Upgrade
'query' => "UPDATE " . \IPS\Db::i()->prefix . "core_members SET cm_credits=CONCAT( '{\"" . \IPS\Settings::i()->nexus_currency . "\":', cm_credits, '}' );"
) ) );
if ( count( $toRun ) )
if ( \count( $toRun ) )
{
\IPS\core\Setup\Upgrade::adjustMultipleRedirect( array( 1 => 'nexus', 'extra' => array( '_upgradeStep' => 4 ) ) );
@@ -448,7 +448,7 @@ class _Upgrade
{
$offset = isset( \IPS\Request::i()->extra ) ? \IPS\Request::i()->extra : 0;
$select = \IPS\Db::i()->select( '*', 'nexus_paymethods', NULL, 'm_id', array( $offset, 100 ) );
if ( count( $select ) )
if ( \count( $select ) )
{
foreach ( $select as $row )
{
@@ -500,7 +500,7 @@ class _Upgrade
{
$offset = isset( \IPS\Request::i()->extra ) ? \IPS\Request::i()->extra : 0;
$select = \IPS\Db::i()->select( '*', 'nexus_donate_goals', NULL, 'd_id', array( $offset, 100 ) );
if ( count( $select ) )
if ( \count( $select ) )
{
foreach ( $select as $row )
{
@@ -543,7 +543,7 @@ class _Upgrade
{
$offset = isset( \IPS\Request::i()->extra ) ? \IPS\Request::i()->extra : 0;
$select = \IPS\Db::i()->select( '*', 'nexus_package_groups', NULL, 'pg_id', array( $offset, 100 ) );
if ( count( $select ) )
if ( \count( $select ) )
{
foreach ( $select as $row )
{
@@ -586,7 +586,7 @@ class _Upgrade
{
$offset = isset( \IPS\Request::i()->extra ) ? \IPS\Request::i()->extra : 0;
$select = \IPS\Db::i()->select( '*', 'nexus_packages', NULL, 'p_id', array( $offset, 50 ) );
if ( count( $select ) )
if ( \count( $select ) )
{
foreach ( $select as $row )
{
@@ -598,7 +598,7 @@ class _Upgrade
\IPS\Lang::saveCustom( 'nexus', "nexus_package_{$row['p_id']}_page", $row['p_page'] );
$renewOptions = \unserialize( $row['p_renew_options'] );
if( is_array( $renewOptions ) AND count( $renewOptions ) )
if( \is_array( $renewOptions ) AND \count( $renewOptions ) )
{
foreach ( $renewOptions as $k => $v )
{
@@ -608,7 +608,7 @@ class _Upgrade
}
$discounts = \unserialize( $row['p_discounts'] );
if( is_array( $discounts ) AND count( $discounts ) )
if( \is_array( $discounts ) AND \count( $discounts ) )
{
foreach ( $discounts as $type => $_discounts )
{
@@ -670,7 +670,7 @@ class _Upgrade
{
$offset = isset( \IPS\Request::i()->extra ) ? \IPS\Request::i()->extra : 0;
$select = \IPS\Db::i()->select( '*', 'nexus_support_departments', NULL, 'dpt_id', array( $offset, 100 ) );
if ( count( $select ) )
if ( \count( $select ) )
{
foreach ( $select as $row )
{
@@ -712,7 +712,7 @@ class _Upgrade
{
$offset = isset( \IPS\Request::i()->extra ) ? \IPS\Request::i()->extra : 0;
$select = \IPS\Db::i()->select( '*', 'nexus_shipping', NULL, 's_id', array( $offset, 100 ) );
if ( count( $select ) )
if ( \count( $select ) )
{
foreach ( $select as $row )
{
@@ -759,7 +759,7 @@ class _Upgrade
{
$offset = isset( \IPS\Request::i()->extra ) ? \IPS\Request::i()->extra : 0;
$select = \IPS\Db::i()->select( '*', 'nexus_support_severities', NULL, 'sev_id', array( $offset, 100 ) );
if ( count( $select ) )
if ( \count( $select ) )
{
foreach ( $select as $row )
{
@@ -824,7 +824,7 @@ class _Upgrade
{
$offset = isset( \IPS\Request::i()->extra ) ? \IPS\Request::i()->extra : 0;
$select = \IPS\Db::i()->select( '*', 'nexus_support_statuses', NULL, 'status_id', array( $offset, 100 ) );
if ( count( $select ) )
if ( \count( $select ) )
{
foreach ( $select as $row )
{
@@ -868,7 +868,7 @@ class _Upgrade
{
$offset = isset( \IPS\Request::i()->extra ) ? \IPS\Request::i()->extra : 0;
$select = \IPS\Db::i()->select( '*', 'nexus_tax', NULL, 't_id', array( $offset, 100 ) );
if ( count( $select ) )
if ( \count( $select ) )
{
foreach ( $select as $row )
{
@@ -879,7 +879,7 @@ class _Upgrade
foreach ( $unserialized as $rate )
{
$rateToSave = array( 'locations' => array(), 'rate' => floatval( $rate['rate'] ) );
$rateToSave = array( 'locations' => array(), 'rate' => \floatval( $rate['rate'] ) );
if ( $rate['applies'] === '*' )
{
$rateToSave['locations'] = '*';
@@ -888,7 +888,7 @@ class _Upgrade
{
foreach ( $rate['applies'] as $location => $subLocations )
{
if ( count( $subLocations ) )
if ( \count( $subLocations ) )
{
$rateToSave['locations'][ $location ] = $subLocations;
}
@@ -941,7 +941,7 @@ class _Upgrade
{
$offset = isset( \IPS\Request::i()->extra ) ? \IPS\Request::i()->extra : 0;
$select = \IPS\Db::i()->select( '*', 'nexus_support_stock_actions', NULL, 'action_id', array( $offset, 100 ) );
if ( count( $select ) )
if ( \count( $select ) )
{
foreach ( $select as $row )
{
@@ -985,7 +985,7 @@ class _Upgrade
{
$offset = isset( \IPS\Request::i()->extra ) ? \IPS\Request::i()->extra : 0;
$select = \IPS\Db::i()->select( '*', 'nexus_customer_fields', NULL, 'f_id', array( $offset, 100 ) );
if ( count( $select ) )
if ( \count( $select ) )
{
foreach ( $select as $row )
{
@@ -1061,7 +1061,7 @@ class _Upgrade
{
$offset = isset( \IPS\Request::i()->extra ) ? \IPS\Request::i()->extra : 0;
$select = \IPS\Db::i()->select( '*', 'nexus_package_fields', NULL, 'cf_id', array( $offset, 100 ) );
if ( count( $select ) )
if ( \count( $select ) )
{
foreach ( $select as $row )
{
@@ -1136,7 +1136,7 @@ class _Upgrade
{
$offset = isset( \IPS\Request::i()->extra ) ? \IPS\Request::i()->extra : 0;
$select = \IPS\Db::i()->select( '*', 'nexus_support_fields', NULL, 'sf_id', array( $offset, 100 ) );
if ( count( $select ) )
if ( \count( $select ) )
{
foreach ( $select as $row )
{
@@ -1211,7 +1211,7 @@ class _Upgrade
{
$offset = isset( \IPS\Request::i()->extra ) ? \IPS\Request::i()->extra : 0;
$select = \IPS\Db::i()->select( '*', 'nexus_support_requests', NULL, 'r_id', array( $offset, 500 ) );
if ( count( $select ) )
if ( \count( $select ) )
{
foreach ( $select as $row )
{
@@ -1256,7 +1256,7 @@ class _Upgrade
{
$offset = isset( \IPS\Request::i()->extra ) ? \IPS\Request::i()->extra : 0;
$select = \IPS\Db::i()->select( '*', 'nexus_coupons', NULL, 'c_id', array( $offset, 500 ) );
if ( count( $select ) )
if ( \count( $select ) )
{
foreach ( $select as $row )
{
@@ -1298,7 +1298,7 @@ class _Upgrade
{
$offset = isset( \IPS\Request::i()->extra ) ? \IPS\Request::i()->extra : 0;
$select = \IPS\Db::i()->select( '*', 'nexus_eom', NULL, 'eom_id', array( $offset, 100 ) );
if ( count( $select ) )
if ( \count( $select ) )
{
foreach ( $select as $row )
{
@@ -1340,7 +1340,7 @@ class _Upgrade
{
$offset = isset( \IPS\Request::i()->extra ) ? \IPS\Request::i()->extra : 0;
$select = \IPS\Db::i()->select( '*', 'nexus_hosting_errors', NULL, 'e_id', array( $offset, 100 ) );
if ( count( $select ) )
if ( \count( $select ) )
{
foreach ( $select as $row )
{
@@ -1382,7 +1382,7 @@ class _Upgrade
{
$offset = isset( \IPS\Request::i()->extra ) ? \IPS\Request::i()->extra : 0;
$select = \IPS\Db::i()->select( '*', 'nexus_invoices', NULL, 'i_id', array( $offset, 500 ) );
if ( count( $select ) )
if ( \count( $select ) )
{
foreach ( $select as $row )
{
@@ -1427,7 +1427,7 @@ class _Upgrade
{
$offset = isset( \IPS\Request::i()->extra ) ? \IPS\Request::i()->extra : 0;
$select = \IPS\Db::i()->select( '*', 'nexus_licensekeys', NULL, 'lkey_key', array( $offset, 500 ) );
if ( count( $select ) )
if ( \count( $select ) )
{
foreach ( $select as $row )
{
@@ -1471,7 +1471,7 @@ class _Upgrade
{
$offset = isset( \IPS\Request::i()->extra ) ? \IPS\Request::i()->extra : 0;
$select = \IPS\Db::i()->select( '*', 'nexus_payouts', NULL, 'po_id', array( $offset, 500 ) );
if ( count( $select ) )
if ( \count( $select ) )
{
foreach ( $select as $row )
{
@@ -1515,7 +1515,7 @@ class _Upgrade
{
$offset = isset( \IPS\Request::i()->extra ) ? \IPS\Request::i()->extra : 0;
$select = \IPS\Db::i()->select( '*', 'nexus_product_options', NULL, 'opt_id', array( $offset, 500 ) );
if ( count( $select ) )
if ( \count( $select ) )
{
foreach ( $select as $row )
{
@@ -1559,7 +1559,7 @@ class _Upgrade
{
$offset = isset( \IPS\Request::i()->extra ) ? \IPS\Request::i()->extra : 0;
$select = \IPS\Db::i()->select( '*', 'nexus_purchases', NULL, 'ps_id', array( $offset, 500 ) );
if ( count( $select ) )
if ( \count( $select ) )
{
foreach ( $select as $row )
{
@@ -1611,7 +1611,7 @@ class _Upgrade
{
$offset = isset( \IPS\Request::i()->extra ) ? \IPS\Request::i()->extra : 0;
$select = \IPS\Db::i()->select( '*', 'nexus_ship_orders', NULL, 'o_id', array( $offset, 500 ) );
if ( count( $select ) )
if ( \count( $select ) )
{
foreach ( $select as $row )
{
@@ -1656,7 +1656,7 @@ class _Upgrade
{
$offset = isset( \IPS\Request::i()->extra ) ? \IPS\Request::i()->extra : 0;
$select = \IPS\Db::i()->select( '*', 'nexus_transactions', NULL, 't_id', array( $offset, 500 ) );
if ( count( $select ) )
if ( \count( $select ) )
{
foreach ( $select as $row )
{