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

@@ -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 30 Oct 2014
* @version SVN_VERSION_NUMBER
*/
namespace IPS\nexus\setup\upg_100002;
Whitespace-only changes.
@@ -1,23 +0,0 @@
{
"1": {
"method": "changeColumn",
"params": [
"nexus_customer_history",
"log_by",
{
"name": "log_by",
"type": "MEDIUMINT",
"length": 8,
"decimals": null,
"values": [],
"allow_null": true,
"default": "0",
"comment": "",
"unsigned": false,
"zerofill": false,
"auto_increment": false,
"binary": false
}
]
}
}
@@ -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 17 Feb 2015
* @version SVN_VERSION_NUMBER
*/
namespace IPS\nexus\setup\upg_100014;
@@ -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 19 Feb 2015
* @version SVN_VERSION_NUMBER
*/
namespace IPS\nexus\setup\upg_100016;
@@ -1,13 +1,12 @@
<?php
/**
* @brief 4.0.0 RC 5 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 5 May 2015
* @version SVN_VERSION_NUMBER
*/
namespace IPS\nexus\setup\upg_100018;
@@ -1,13 +1,12 @@
<?php
/**
* @brief 4.0.5 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 5 May 2015
* @version SVN_VERSION_NUMBER
*/
namespace IPS\nexus\setup\upg_100028;
@@ -1,13 +1,12 @@
<?php
/**
* @brief 4.0.99 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 23 Jul 2015
* @version SVN_VERSION_NUMBER
*/
namespace IPS\nexus\setup\upg_101000;
@@ -1,13 +1,12 @@
<?php
/**
* @brief 4.1.5 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 24 Nov 2015
* @version SVN_VERSION_NUMBER
*/
namespace IPS\nexus\setup\upg_101017;
@@ -1,13 +1,12 @@
<?php
/**
* @brief 4.1.6 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 18 Nov 2015
* @version SVN_VERSION_NUMBER
*/
namespace IPS\nexus\setup\upg_101021;
@@ -1,13 +1,12 @@
<?php
/**
* @brief 4.1.9 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 5 Feb 2016
* @version SVN_VERSION_NUMBER
*/
namespace IPS\nexus\setup\upg_101026;
@@ -1,13 +1,12 @@
<?php
/**
* @brief 4.1.13 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 29 May 2016
* @version SVN_VERSION_NUMBER
*/
namespace IPS\nexus\setup\upg_101034;
@@ -1,13 +1,12 @@
<?php
/**
* @brief 1.1.0 Alpha 5 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 19 Dec 2014
* @version SVN_VERSION_NUMBER
*/
namespace IPS\nexus\setup\upg_10104;
@@ -1,13 +1,12 @@
<?php
/**
* @brief 4.1.14 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 Commerce
* @since 26 Jul 2016
* @version SVN_VERSION_NUMBER
*/
namespace IPS\nexus\setup\upg_101042;
@@ -1,13 +1,12 @@
<?php
/**
* @brief 4.1.17 Beta 3 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 Commerce
* @since 28 Nov 2016
* @version SVN_VERSION_NUMBER
*/
namespace IPS\nexus\setup\upg_101075;
@@ -1,13 +1,12 @@
<?php
/**
* @brief 4.1.18.1 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 Commerce
* @since 20 Jan 2017
* @version SVN_VERSION_NUMBER
*/
namespace IPS\nexus\setup\upg_101088;
@@ -0,0 +1,380 @@
{
"1": {
"method": "addColumn",
"params": [
"nexus_packages",
{
"name": "p_meta_data",
"type": "BIT",
"length": 1,
"decimals": null,
"values": null,
"allow_null": false,
"default": "0",
"comment": "",
"unsigned": false,
"zerofill": false,
"auto_increment": false,
"binary": false
}
]
},
"2": {
"method": "delete",
"params": [
"core_sys_lang_words",
"word_app='nexus' AND ( word_key IN('log_type','log_date','log_ip_address','log_data','log_member','customers_all_history','history_email_changed_from','history_name_changed_from','history_password_changed') )"
]
},
"3": {
"method": "addColumn",
"params": [
"nexus_fraud_rules",
{
"name": "f_products",
"type": "TEXT",
"length": null,
"decimals": null,
"values": null,
"allow_null": true,
"default": null,
"comment": "",
"unsigned": false,
"zerofill": false,
"auto_increment": false,
"binary": false
}
]
},
"4": {
"method": "addColumn",
"params": [
"nexus_fraud_rules",
{
"name": "f_customer_reg",
"type": "CHAR",
"length": 1,
"decimals": null,
"values": null,
"allow_null": true,
"default": null,
"comment": "",
"unsigned": false,
"zerofill": false,
"auto_increment": false,
"binary": false
}
]
},
"5": {
"method": "addColumn",
"params": [
"nexus_fraud_rules",
{
"name": "f_customer_reg_unit",
"type": "INT",
"length": 3,
"decimals": null,
"values": null,
"allow_null": true,
"default": null,
"comment": "",
"unsigned": true,
"zerofill": false,
"auto_increment": false,
"binary": false
}
]
},
"6": {
"method": "addColumn",
"params": [
"nexus_fraud_rules",
{
"name": "f_customer_groups",
"type": "TEXT",
"length": null,
"decimals": null,
"values": null,
"allow_null": true,
"default": null,
"comment": "",
"unsigned": false,
"zerofill": false,
"auto_increment": false,
"binary": false
}
]
},
"7": {
"method": "addColumn",
"params": [
"nexus_fraud_rules",
{
"name": "f_customer_spend",
"type": "CHAR",
"length": 1,
"decimals": null,
"values": null,
"allow_null": true,
"default": null,
"comment": "",
"unsigned": false,
"zerofill": false,
"auto_increment": false,
"binary": false
}
]
},
"8": {
"method": "addColumn",
"params": [
"nexus_fraud_rules",
{
"name": "f_customer_spend_unit",
"type": "TEXT",
"length": null,
"decimals": null,
"values": null,
"allow_null": true,
"default": null,
"comment": "",
"unsigned": false,
"zerofill": false,
"auto_increment": false,
"binary": false
}
]
},
"9": {
"method": "addColumn",
"params": [
"nexus_fraud_rules",
{
"name": "f_last_okay_trans",
"type": "CHAR",
"length": 1,
"decimals": null,
"values": null,
"allow_null": true,
"default": null,
"comment": "",
"unsigned": false,
"zerofill": false,
"auto_increment": false,
"binary": false
}
]
},
"10": {
"method": "addColumn",
"params": [
"nexus_fraud_rules",
{
"name": "f_last_okay_trans_unit",
"type": "INT",
"length": 3,
"decimals": null,
"values": null,
"allow_null": true,
"default": null,
"comment": "",
"unsigned": true,
"zerofill": false,
"auto_increment": false,
"binary": false
}
]
},
"11": {
"method": "addColumn",
"params": [
"nexus_fraud_rules",
{
"name": "f_ip",
"type": "CHAR",
"length": 1,
"decimals": null,
"values": null,
"allow_null": true,
"default": null,
"comment": "",
"unsigned": false,
"zerofill": false,
"auto_increment": false,
"binary": false
}
]
},
"12": {
"method": "addColumn",
"params": [
"nexus_fraud_rules",
{
"name": "f_ip_unit",
"type": "VARCHAR",
"length": 255,
"decimals": null,
"values": null,
"allow_null": true,
"default": null,
"comment": "",
"unsigned": false,
"zerofill": false,
"auto_increment": false,
"binary": false
}
]
},
"13": {
"method": "addColumn",
"params": [
"nexus_fraud_rules",
{
"name": "f_trans_fail",
"type": "CHAR",
"length": 1,
"decimals": null,
"values": null,
"allow_null": true,
"default": null,
"comment": "",
"unsigned": false,
"zerofill": false,
"auto_increment": false,
"binary": false
}
]
},
"14": {
"method": "addColumn",
"params": [
"nexus_fraud_rules",
{
"name": "f_trans_fail_unit",
"type": "INT",
"length": 3,
"decimals": null,
"values": null,
"allow_null": true,
"default": null,
"comment": "",
"unsigned": false,
"zerofill": false,
"auto_increment": false,
"binary": false
}
]
},
"15": {
"method": "addColumn",
"params": [
"nexus_fraud_rules",
{
"name": "f_custom_fields",
"type": "TEXT",
"length": null,
"decimals": null,
"values": null,
"allow_null": true,
"default": null,
"comment": "",
"unsigned": false,
"zerofill": false,
"auto_increment": false,
"binary": false
}
]
},
"16": {
"method": "update",
"params": [
"core_members",
"members_bitoptions2=members_bitoptions2 | 2048",
[
"cm_return_group>?",
0
]
]
},
"17": {
"method": "addColumn",
"params": [
"nexus_customer_fields",
{
"name": "f_allow_attachments",
"type": "TINYINT",
"length": 1,
"decimals": null,
"values": null,
"allow_null": false,
"default": "1",
"comment": "",
"unsigned": true,
"zerofill": false,
"auto_increment": false,
"binary": false
}
]
},
"18": {
"method": "addColumn",
"params": [
"nexus_support_fields",
{
"name": "sf_allow_attachments",
"type": "TINYINT",
"length": 1,
"decimals": null,
"values": null,
"allow_null": false,
"default": "1",
"comment": "",
"unsigned": true,
"zerofill": false,
"auto_increment": false,
"binary": false
}
]
},
"19": {
"method": "addColumn",
"params": [
"nexus_package_fields",
{
"name": "cf_allow_attachments",
"type": "TINYINT",
"length": 1,
"decimals": null,
"values": null,
"allow_null": false,
"default": "1",
"comment": "",
"unsigned": false,
"zerofill": false,
"auto_increment": false,
"binary": false
}
]
},
"20": {
"method": "addColumn",
"params": [
"nexus_donate_goals",
{
"name": "d_name_seo",
"type": "VARCHAR",
"length": 255,
"decimals": null,
"values": null,
"allow_null": true,
"default": null,
"comment": "",
"unsigned": false,
"zerofill": false,
"auto_increment": false,
"binary": false
}
]
}
}
@@ -1,13 +1,12 @@
<?php
/**
* @brief 1.2 Alpha 1 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 19 Dec 2014
* @version SVN_VERSION_NUMBER
*/
namespace IPS\nexus\setup\upg_11100;
@@ -1,13 +1,12 @@
<?php
/**
* @brief 1.2 Alpha 2 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 19 Dec 2014
* @version SVN_VERSION_NUMBER
*/
namespace IPS\nexus\setup\upg_11101;
@@ -1,13 +1,12 @@
<?php
/**
* @brief 1.4.0 Beta 1 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 19 Dec 2014
* @version SVN_VERSION_NUMBER
*/
namespace IPS\nexus\setup\upg_14000;
@@ -1,13 +1,12 @@
<?php
/**
* @brief 1.4.2 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 19 Dec 2014
* @version SVN_VERSION_NUMBER
*/
namespace IPS\nexus\setup\upg_14004;
@@ -1,13 +1,12 @@
<?php
/**
* @brief 1.5.0 Alpha 1 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 19 Dec 2014
* @version SVN_VERSION_NUMBER
*/
namespace IPS\nexus\setup\upg_15000;
@@ -1,13 +1,12 @@
<?php
/**
* @brief 1.5.0 Alpha 2 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 19 Dec 2014
* @version SVN_VERSION_NUMBER
*/
namespace IPS\nexus\setup\upg_15001;
@@ -1,13 +1,12 @@
<?php
/**
* @brief 1.5.0 Beta 1 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 19 Dec 2014
* @version SVN_VERSION_NUMBER
*/
namespace IPS\nexus\setup\upg_15003;
@@ -1,13 +1,12 @@
<?php
/**
* @brief Upgrader: Custom Upgrade Options
* @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 5 Jun 2014
* @version SVN_VERSION_NUMBER
*/
$options = array();
+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
*