Version 4.2.0

This commit is contained in:
Neo committed 2025-12-19 05:44:59 -08:00
1 parent 0dc2aee5ed
commit 96997ddd8e
2074 files changed
+125454 -55780

No files matched your search

+5 -48
View File
@@ -1,13 +1,12 @@
<?php
/**
* @brief 4.0.0 Upgrade Code
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
* @copyright (c) 2001 - 2016 Invision Power Services, Inc.
* @license http://www.invisionpower.com/legal/standards/
* @package IPS Community Suite
* @author <a href='https://www.invisioncommunity.com'>Invision Power Services, Inc.</a>
* @copyright (c) Invision Power Services, Inc.
* @license https://www.invisioncommunity.com/legal/standards/
* @package Invision Community
* @subpackage Nexus
* @since 10 Feb 2014
* @version SVN_VERSION_NUMBER
*/
namespace IPS\nexus\setup\upg_40000;
@@ -88,7 +87,7 @@ class _Upgrade
$state = $customer['cm_state'];
/* IPS4 requires the full state name to be stored. */
/* 4.x requires the full state name to be stored. */
if ( $customer['cm_state'] AND $customer['cm_country'] )
{
if ( isset( \IPS\nexus\Customer\Address::$stateCodes[ $customer['cm_country'] ] ) )
@@ -1289,48 +1288,6 @@ class _Upgrade
return "Upgrading commerce coupons (Upgraded so far: " . ( ( $limit > $_SESSION['_step25Count'] ) ? $_SESSION['_step25Count'] : $limit ) . ' out of ' . $_SESSION['_step25Count'] . ')';
}
/**
* Serialized: Customer History
*
* @return mixed If returns TRUE, upgrader will proceed to next step. If it returns any other value, it will set this as the value of the 'extra' GET parameter and rerun this step (useful for loops)
*/
public function step26()
{
$offset = isset( \IPS\Request::i()->extra ) ? \IPS\Request::i()->extra : 0;
$select = \IPS\Db::i()->select( '*', 'nexus_customer_history', NULL, 'log_id', array( $offset, 500 ) );
if ( count( $select ) )
{
foreach ( $select as $row )
{
\IPS\Db::i()->update( 'nexus_customer_history', array( 'log_data' => json_encode( \unserialize( $row['log_data'] ) ) ), array( 'log_id=?', $row['log_id'] ) );
}
return $offset + 500;
}
else
{
unset( $_SESSION['_step26Count'] );
return TRUE;
}
}
/**
* Custom title for this step
*
* @return string
*/
public function step26CustomTitle()
{
$limit = isset( \IPS\Request::i()->extra ) ? \IPS\Request::i()->extra : 0;
if( !isset( $_SESSION['_step26Count'] ) )
{
$_SESSION['_step26Count'] = \IPS\Db::i()->select( 'COUNT(*)', 'nexus_customer_history' )->first();
}
return "Upgrading commerce customer history (Upgraded so far: " . ( ( $limit > $_SESSION['_step26Count'] ) ? $_SESSION['_step26Count'] : $limit ) . ' out of ' . $_SESSION['_step26Count'] . ')';
}
/**
* Serialized: EOM
*