Version 5.0.0 beta 1
This commit is contained in:
1 parent
25ddeb65d6
commit
15c7beabc5
6736 files changed
+627902
-497943
No files matched your search
Whitespace-only changes.
@@ -1,42 +0,0 @@
|
||||
{
|
||||
"1": {
|
||||
"method": "addColumn",
|
||||
"params": [
|
||||
"nexus_packages",
|
||||
{
|
||||
"name": "p_date_added",
|
||||
"type": "INT",
|
||||
"length": 10,
|
||||
"decimals": null,
|
||||
"values": [],
|
||||
"allow_null": false,
|
||||
"default": null,
|
||||
"comment": "",
|
||||
"unsigned": true,
|
||||
"zerofill": false,
|
||||
"auto_increment": false,
|
||||
"binary": false
|
||||
}
|
||||
]
|
||||
},
|
||||
"2": {
|
||||
"method": "addColumn",
|
||||
"params": [
|
||||
"nexus_packages",
|
||||
{
|
||||
"name": "p_rating",
|
||||
"type": "FLOAT",
|
||||
"length": null,
|
||||
"decimals": null,
|
||||
"values": [],
|
||||
"allow_null": false,
|
||||
"default": "0",
|
||||
"comment": "",
|
||||
"unsigned": false,
|
||||
"zerofill": false,
|
||||
"auto_increment": false,
|
||||
"binary": false
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
Whitespace-only changes.
@@ -1,22 +0,0 @@
|
||||
{
|
||||
"1": {
|
||||
"method": "addColumn",
|
||||
"params": [
|
||||
"nexus_package_groups",
|
||||
{
|
||||
"name": "pg_image",
|
||||
"type": "TEXT",
|
||||
"length": null,
|
||||
"decimals": null,
|
||||
"values": [],
|
||||
"allow_null": true,
|
||||
"default": null,
|
||||
"comment": "",
|
||||
"unsigned": false,
|
||||
"zerofill": false,
|
||||
"auto_increment": false,
|
||||
"binary": false
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -1,47 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* @brief 4.0.0 Upgrade Code
|
||||
* @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
|
||||
*/
|
||||
|
||||
namespace IPS\nexus\setup\upg_100002;
|
||||
|
||||
/* To prevent PHP errors (extending class does not exist) revealing path */
|
||||
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
{
|
||||
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
|
||||
exit;
|
||||
}
|
||||
|
||||
/**
|
||||
* 4.0.0 Upgrade Code
|
||||
*/
|
||||
class _Upgrade
|
||||
{
|
||||
/**
|
||||
* Fix SEO titles
|
||||
*
|
||||
* @return array 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 step1()
|
||||
{
|
||||
\IPS\Db::i()->update( 'nexus_packages', array( 'p_seo_name' => null ) );
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Custom title for this step
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function step1CustomTitle()
|
||||
{
|
||||
return "Resetting commerce friendly URL titles";
|
||||
}
|
||||
}
|
||||
Whitespace-only changes.
@@ -1,162 +0,0 @@
|
||||
{
|
||||
"1": {
|
||||
"method": "createTable",
|
||||
"params": [
|
||||
{
|
||||
"name": "nexus_support_request_log",
|
||||
"columns": {
|
||||
"rlog_id": {
|
||||
"name": "rlog_id",
|
||||
"type": "BIGINT",
|
||||
"length": 20,
|
||||
"decimals": null,
|
||||
"values": [],
|
||||
"allow_null": false,
|
||||
"default": null,
|
||||
"comment": "ID Number",
|
||||
"unsigned": true,
|
||||
"zerofill": false,
|
||||
"auto_increment": true,
|
||||
"binary": false
|
||||
},
|
||||
"rlog_request": {
|
||||
"name": "rlog_request",
|
||||
"type": "INT",
|
||||
"length": 10,
|
||||
"decimals": null,
|
||||
"values": [],
|
||||
"allow_null": false,
|
||||
"default": null,
|
||||
"comment": "The support request ID number",
|
||||
"unsigned": true,
|
||||
"zerofill": false,
|
||||
"auto_increment": false,
|
||||
"binary": false
|
||||
},
|
||||
"rlog_member": {
|
||||
"name": "rlog_member",
|
||||
"type": "MEDIUMINT",
|
||||
"length": 8,
|
||||
"decimals": null,
|
||||
"values": [],
|
||||
"allow_null": false,
|
||||
"default": null,
|
||||
"comment": "The member ID of the staff performing the action",
|
||||
"unsigned": true,
|
||||
"zerofill": false,
|
||||
"auto_increment": false,
|
||||
"binary": false
|
||||
},
|
||||
"rlog_action": {
|
||||
"name": "rlog_action",
|
||||
"type": "VARCHAR",
|
||||
"length": 32,
|
||||
"decimals": null,
|
||||
"values": [],
|
||||
"allow_null": false,
|
||||
"default": null,
|
||||
"comment": "The field being changed",
|
||||
"unsigned": false,
|
||||
"zerofill": false,
|
||||
"auto_increment": false,
|
||||
"binary": false
|
||||
},
|
||||
"rlog_old": {
|
||||
"name": "rlog_old",
|
||||
"type": "INT",
|
||||
"length": 10,
|
||||
"decimals": null,
|
||||
"values": [],
|
||||
"allow_null": true,
|
||||
"default": null,
|
||||
"comment": "The old value",
|
||||
"unsigned": false,
|
||||
"zerofill": false,
|
||||
"auto_increment": false,
|
||||
"binary": false
|
||||
},
|
||||
"rlog_new": {
|
||||
"name": "rlog_new",
|
||||
"type": "INT",
|
||||
"length": 10,
|
||||
"decimals": null,
|
||||
"values": [],
|
||||
"allow_null": true,
|
||||
"default": null,
|
||||
"comment": "The new value",
|
||||
"unsigned": false,
|
||||
"zerofill": false,
|
||||
"auto_increment": false,
|
||||
"binary": false
|
||||
},
|
||||
"rlog_date": {
|
||||
"name": "rlog_date",
|
||||
"type": "INT",
|
||||
"length": 10,
|
||||
"decimals": null,
|
||||
"values": [],
|
||||
"allow_null": false,
|
||||
"default": null,
|
||||
"comment": "Unix timestamp of when change was made",
|
||||
"unsigned": false,
|
||||
"zerofill": false,
|
||||
"auto_increment": false,
|
||||
"binary": false
|
||||
}
|
||||
},
|
||||
"indexes": {
|
||||
"PRIMARY": {
|
||||
"type": "primary",
|
||||
"name": "PRIMARY",
|
||||
"columns": [
|
||||
"rlog_id"
|
||||
],
|
||||
"length": [
|
||||
null
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"2": {
|
||||
"method": "addColumn",
|
||||
"params": [
|
||||
"nexus_support_statuses",
|
||||
{
|
||||
"name": "status_log",
|
||||
"type": "TINYINT",
|
||||
"length": 1,
|
||||
"decimals": null,
|
||||
"values": [],
|
||||
"allow_null": false,
|
||||
"default": "1",
|
||||
"comment": "Should setting the status be logged?",
|
||||
"unsigned": false,
|
||||
"zerofill": false,
|
||||
"auto_increment": false,
|
||||
"binary": false
|
||||
}
|
||||
]
|
||||
},
|
||||
"3": {
|
||||
"method": "addIndex",
|
||||
"params": [
|
||||
"nexus_purchases",
|
||||
{
|
||||
"type": "key",
|
||||
"name": "ps_purchases",
|
||||
"columns": [
|
||||
"ps_app",
|
||||
"ps_type",
|
||||
"ps_item_id"
|
||||
],
|
||||
"length": [
|
||||
250,
|
||||
250,
|
||||
null
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
Whitespace-only changes.
Whitespace-only changes.
@@ -1,22 +0,0 @@
|
||||
{
|
||||
"1": {
|
||||
"method": "addColumn",
|
||||
"params": [
|
||||
"nexus_package_fields",
|
||||
{
|
||||
"name": "cf_multiple",
|
||||
"type": "TINYINT",
|
||||
"length": 1,
|
||||
"decimals": null,
|
||||
"values": [],
|
||||
"allow_null": false,
|
||||
"default": "0",
|
||||
"comment": "",
|
||||
"unsigned": true,
|
||||
"zerofill": false,
|
||||
"auto_increment": false,
|
||||
"binary": false
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
Whitespace-only changes.
@@ -1,38 +0,0 @@
|
||||
{
|
||||
"1": {
|
||||
"method": "addColumn",
|
||||
"params": [
|
||||
"nexus_support_statuses",
|
||||
{
|
||||
"name": "status_color",
|
||||
"type": "char",
|
||||
"length": 6,
|
||||
"allow_null": false
|
||||
}
|
||||
]
|
||||
},
|
||||
"2": {
|
||||
"method": "addColumn",
|
||||
"params": [
|
||||
"nexus_support_requests",
|
||||
{
|
||||
"name": "r_last_staff_reply",
|
||||
"type": "INT",
|
||||
"length": 10,
|
||||
"allow_null": false
|
||||
}
|
||||
]
|
||||
},
|
||||
"3": {
|
||||
"method": "addColumn",
|
||||
"params": [
|
||||
"nexus_purchases",
|
||||
{
|
||||
"name": "ps_admin_uri",
|
||||
"type": "varchar",
|
||||
"length": 255,
|
||||
"allow_null": false
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
Whitespace-only changes.
@@ -1,35 +0,0 @@
|
||||
{
|
||||
"1": {
|
||||
"method": "update",
|
||||
"params": [
|
||||
"nexus_packages_products",
|
||||
{
|
||||
"p_lkey": 0
|
||||
},
|
||||
"p_lkey NOT IN( '0', 'standard', 'mdfive' )"
|
||||
]
|
||||
},
|
||||
"2": {
|
||||
"method": "update",
|
||||
"params": [
|
||||
"nexus_licensekeys",
|
||||
{
|
||||
"lkey_type": "mdfive"
|
||||
},
|
||||
[
|
||||
"lkey_type=?",
|
||||
"md5"
|
||||
]
|
||||
]
|
||||
},
|
||||
"3": {
|
||||
"method": "update",
|
||||
"params": [
|
||||
"nexus_licensekeys",
|
||||
{
|
||||
"lkey_type": "standard"
|
||||
},
|
||||
"lkey_type NOT IN('mdfive','standard')"
|
||||
]
|
||||
}
|
||||
}
|
||||
Whitespace-only changes.
@@ -1,22 +0,0 @@
|
||||
{
|
||||
"1": {
|
||||
"method": "addColumn",
|
||||
"params": [
|
||||
"nexus_support_fields",
|
||||
{
|
||||
"name": "sf_validate",
|
||||
"type": "TINYINT",
|
||||
"length": 1,
|
||||
"decimals": null,
|
||||
"values": [],
|
||||
"allow_null": false,
|
||||
"default": "1",
|
||||
"comment": "",
|
||||
"unsigned": true,
|
||||
"zerofill": false,
|
||||
"auto_increment": false,
|
||||
"binary": false
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -1,97 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* @brief 4.0.0 Upgrade Code
|
||||
* @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
|
||||
*/
|
||||
|
||||
namespace IPS\nexus\setup\upg_100014;
|
||||
|
||||
/* To prevent PHP errors (extending class does not exist) revealing path */
|
||||
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
{
|
||||
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
|
||||
exit;
|
||||
}
|
||||
|
||||
/**
|
||||
* 4.0.0 Upgrade Code
|
||||
*/
|
||||
class _Upgrade
|
||||
{
|
||||
/**
|
||||
* Convert Commerce ads to normal ads
|
||||
*
|
||||
* @return array 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 step1()
|
||||
{
|
||||
if ( !\IPS\Db::i()->checkForTable('nexus_ads') )
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
$offset = isset( \IPS\Request::i()->extra ) ? \IPS\Request::i()->extra : 0;
|
||||
|
||||
$select = \IPS\Db::i()->select( '*', 'nexus_ads', NULL, 'ad_id', array( $offset, 100 ) );
|
||||
if ( \count( $select ) )
|
||||
{
|
||||
\IPS\Settings::i()->changeValues( array( 'ads_exist' => 1 ) );
|
||||
|
||||
foreach ( $select as $ad )
|
||||
{
|
||||
$locations = explode( ',', trim( $ad['ad_locations'], ',' ) );
|
||||
foreach ( $locations as $k => $v )
|
||||
{
|
||||
$locations[ $k ] = str_replace( '_code', '', $v );
|
||||
}
|
||||
|
||||
$adShow = '*';
|
||||
|
||||
if( $ad['ad_exempt'] )
|
||||
{
|
||||
$adShow = json_encode( array_diff( array_keys( \IPS\Member\Group::groups() ), explode( ',', $ad['ad_exempt'] ) ) );
|
||||
}
|
||||
|
||||
\IPS\Db::i()->insert( 'core_advertisements', array(
|
||||
'ad_location' => implode( ',', $locations ),
|
||||
'ad_html' => $ad['ad_html'] ?: NULL,
|
||||
'ad_images' => $ad['ad_image'] ? json_encode( array( 'large' => $ad['ad_image'] ) ) : NULL,
|
||||
'ad_link' => $ad['ad_link'],
|
||||
'ad_impressions' => $ad['ad_impressions'],
|
||||
'ad_clicks' => $ad['ad_clicks'],
|
||||
'ad_exempt' => $adShow,
|
||||
'ad_active' => $ad['ad_active'],
|
||||
'ad_html_https' => NULL,
|
||||
'ad_start' => $ad['ad_start'],
|
||||
'ad_end' => $ad['ad_end'],
|
||||
'ad_maximum_value' => $ad['ad_expire'] ?: -1,
|
||||
'ad_maximum_unit' => $ad['ad_expire_unit'],
|
||||
'ad_additional_settings'=> json_encode( array() ),
|
||||
'ad_html_https_set' => 0,
|
||||
'ad_member' => $ad['ad_member'],
|
||||
) );
|
||||
}
|
||||
|
||||
return $offset + 100;
|
||||
}
|
||||
else
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Custom title for this step
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function step1CustomTitle()
|
||||
{
|
||||
return "Upgrading advertisements";
|
||||
}
|
||||
}
|
||||
Whitespace-only changes.
@@ -1,44 +0,0 @@
|
||||
{
|
||||
"1": {
|
||||
"method": "changeColumn",
|
||||
"params": [
|
||||
"nexus_package_fields",
|
||||
"cf_type",
|
||||
{
|
||||
"name": "cf_type",
|
||||
"type": "VARCHAR",
|
||||
"length": 32,
|
||||
"decimals": null,
|
||||
"values": [],
|
||||
"allow_null": true,
|
||||
"default": null,
|
||||
"comment": "",
|
||||
"unsigned": false,
|
||||
"zerofill": false,
|
||||
"auto_increment": false,
|
||||
"binary": false
|
||||
}
|
||||
]
|
||||
},
|
||||
"2": {
|
||||
"method": "changeColumn",
|
||||
"params": [
|
||||
"nexus_support_fields",
|
||||
"sf_type",
|
||||
{
|
||||
"name": "sf_type",
|
||||
"type": "VARCHAR",
|
||||
"length": 32,
|
||||
"decimals": null,
|
||||
"values": [],
|
||||
"allow_null": true,
|
||||
"default": null,
|
||||
"comment": "",
|
||||
"unsigned": false,
|
||||
"zerofill": false,
|
||||
"auto_increment": false,
|
||||
"binary": false
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -1,86 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* @brief 4.0.0 Upgrade Code
|
||||
* @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
|
||||
*/
|
||||
|
||||
namespace IPS\nexus\setup\upg_100016;
|
||||
|
||||
/* To prevent PHP errors (extending class does not exist) revealing path */
|
||||
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
{
|
||||
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
|
||||
exit;
|
||||
}
|
||||
|
||||
/**
|
||||
* 4.0.0 Upgrade Code
|
||||
*/
|
||||
class _Upgrade
|
||||
{
|
||||
/**
|
||||
* Convert Commerce ads to normal ads
|
||||
*
|
||||
* @return array 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 step1()
|
||||
{
|
||||
foreach( \IPS\Db::i()->select( '*', 'core_sys_lang_words', \IPS\Db::i()->in( 'word_key', "word_key LIKE 'nexus_package_%'" ) ) as $word )
|
||||
{
|
||||
// To finish
|
||||
if( mb_strpos( $word['word_key'], '_desc' ) === FALSE AND mb_strpos( $word['word_key'], '_assoc' ) === FALSE AND mb_strpos( $word['word_key'], '_page' ) === FALSE )
|
||||
{
|
||||
\IPS\Lang::saveCustom( 'nexus', $word['word_key'], strip_tags( $word['word_custom'] ) );
|
||||
}
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/**
|
||||
* Custom title for this step
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function step1CustomTitle()
|
||||
{
|
||||
return "Fixing package titles";
|
||||
}
|
||||
|
||||
/**
|
||||
* We changed the values for this setting
|
||||
*
|
||||
* @return array 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 step2()
|
||||
{
|
||||
switch ( \IPS\Settings::i()->nexus_sout_from )
|
||||
{
|
||||
case 0:
|
||||
\IPS\Settings::i()->changeValues( array( 'nexus_sout_from' => 'staff' ) );
|
||||
break;
|
||||
|
||||
case 1:
|
||||
\IPS\Settings::i()->changeValues( array( 'nexus_sout_from' => 'dpt' ) );
|
||||
break;
|
||||
}
|
||||
\IPS\Settings::i()->clearCache();
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/**
|
||||
* Custom title for this step
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function step2CustomTitle()
|
||||
{
|
||||
return "Fixing settings";
|
||||
}
|
||||
}
|
||||
Whitespace-only changes.
@@ -1,115 +0,0 @@
|
||||
{
|
||||
"1": {
|
||||
"method": "changeColumn",
|
||||
"params": [
|
||||
"nexus_purchases",
|
||||
"ps_renewal_unit",
|
||||
{
|
||||
"name": "ps_renewal_unit",
|
||||
"type": "CHAR",
|
||||
"length": 1,
|
||||
"decimals": null,
|
||||
"values": [],
|
||||
"allow_null": false,
|
||||
"default": "",
|
||||
"comment": "",
|
||||
"unsigned": false,
|
||||
"zerofill": false,
|
||||
"auto_increment": false,
|
||||
"binary": false
|
||||
}
|
||||
]
|
||||
},
|
||||
"2": {
|
||||
"method": "addIndex",
|
||||
"params": [
|
||||
"nexus_support_departments",
|
||||
{
|
||||
"type": "key",
|
||||
"name": "dp_staff",
|
||||
"columns": [
|
||||
"dpt_staff"
|
||||
],
|
||||
"length": [
|
||||
250
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"3": {
|
||||
"method": "changeIndex",
|
||||
"params": [
|
||||
"nexus_transactions",
|
||||
"t_member",
|
||||
{
|
||||
"type": "key",
|
||||
"name": "t_member",
|
||||
"columns": [
|
||||
"t_member",
|
||||
"t_status",
|
||||
"t_fraud_blocked"
|
||||
],
|
||||
"length": [
|
||||
null,
|
||||
null,
|
||||
null
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"4": {
|
||||
"method": "dropIndex",
|
||||
"params": [
|
||||
"nexus_transactions",
|
||||
"t_member_2"
|
||||
]
|
||||
},
|
||||
"5": {
|
||||
"method": "addIndex",
|
||||
"params": [
|
||||
"nexus_transactions",
|
||||
{
|
||||
"type": "key",
|
||||
"name": "t_status",
|
||||
"columns": [
|
||||
"t_status"
|
||||
],
|
||||
"length": [
|
||||
null
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"6": {
|
||||
"method": "addIndex",
|
||||
"params": [
|
||||
"nexus_payouts",
|
||||
{
|
||||
"type": "key",
|
||||
"name": "po_status",
|
||||
"columns": [
|
||||
"po_status"
|
||||
],
|
||||
"length": [
|
||||
null
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"7": {
|
||||
"method": "addIndex",
|
||||
"params": [
|
||||
"nexus_support_statuses",
|
||||
{
|
||||
"type": "key",
|
||||
"name": "status_open",
|
||||
"columns": [
|
||||
"status_open"
|
||||
],
|
||||
"length": [
|
||||
null
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -1,39 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* @brief 4.0.0 RC 5 Upgrade Code
|
||||
* @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
|
||||
*/
|
||||
|
||||
namespace IPS\nexus\setup\upg_100018;
|
||||
|
||||
/* To prevent PHP errors (extending class does not exist) revealing path */
|
||||
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
{
|
||||
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
|
||||
exit;
|
||||
}
|
||||
|
||||
/**
|
||||
* 4.0.0 RC 5 Upgrade Code
|
||||
*/
|
||||
class _Upgrade
|
||||
{
|
||||
|
||||
/**
|
||||
* Make sure all theme settings are applied to every theme.
|
||||
*
|
||||
* @return array 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 finish()
|
||||
{
|
||||
\IPS\Task::queue( 'core', 'RebuildReputationIndex', array( 'class' => 'IPS\nexus\Package\Review' ), 4 );
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
}
|
||||
Whitespace-only changes.
@@ -1,13 +0,0 @@
|
||||
{
|
||||
"1": {
|
||||
"method": "changeColumn",
|
||||
"params": [
|
||||
"nexus_customer_history",
|
||||
"log_date",
|
||||
{
|
||||
"name": "log_date",
|
||||
"type": "REAL"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
Whitespace-only changes.
@@ -1,58 +0,0 @@
|
||||
{
|
||||
"1": {
|
||||
"method": "dropIndex",
|
||||
"params": [
|
||||
"nexus_reviews",
|
||||
"review_approved"
|
||||
]
|
||||
},
|
||||
"2": {
|
||||
"method": "dropIndex",
|
||||
"params": [
|
||||
"nexus_reviews",
|
||||
"review_ip"
|
||||
]
|
||||
},
|
||||
"3": {
|
||||
"method": "addIndex",
|
||||
"params": [
|
||||
"nexus_reviews",
|
||||
{
|
||||
"type": "key",
|
||||
"name": "review_approved",
|
||||
"columns": [
|
||||
"review_approved"
|
||||
],
|
||||
"length": [
|
||||
null
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"4": {
|
||||
"method": "addIndex",
|
||||
"params": [
|
||||
"nexus_reviews",
|
||||
{
|
||||
"type": "key",
|
||||
"name": "review_ip",
|
||||
"columns": [
|
||||
"review_ip_address"
|
||||
],
|
||||
"length": [
|
||||
null
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"5": {
|
||||
"method": "update",
|
||||
"params": [
|
||||
"nexus_support_severities",
|
||||
{
|
||||
"sev_departments": "*"
|
||||
},
|
||||
"sev_departments IS NULL"
|
||||
]
|
||||
}
|
||||
}
|
||||
Whitespace-only changes.
@@ -1,49 +0,0 @@
|
||||
{
|
||||
"1": {
|
||||
"method": "update",
|
||||
"params": [
|
||||
"nexus_purchases",
|
||||
{
|
||||
"ps_renewal_unit": 0
|
||||
},
|
||||
[
|
||||
"ps_renewal_unit<>? AND ps_renewals=?",
|
||||
"0",
|
||||
"0"
|
||||
]
|
||||
]
|
||||
},
|
||||
"2": {
|
||||
"method": "update",
|
||||
"params": [
|
||||
"nexus_purchases",
|
||||
{
|
||||
"ps_renewal_unit": "m"
|
||||
},
|
||||
[
|
||||
"ps_renewal_unit=? AND ps_renewals>?",
|
||||
"1",
|
||||
"0"
|
||||
]
|
||||
]
|
||||
},
|
||||
"3": {
|
||||
"method": "changeIndex",
|
||||
"params": [
|
||||
"nexus_support_notify",
|
||||
"PRIMARY",
|
||||
{
|
||||
"type": "primary",
|
||||
"name": "PRIMARY",
|
||||
"columns": [
|
||||
"staff_id",
|
||||
"type"
|
||||
],
|
||||
"length": [
|
||||
null,
|
||||
null
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
Whitespace-only changes.
@@ -1,42 +0,0 @@
|
||||
{
|
||||
"1": {
|
||||
"method": "addColumn",
|
||||
"params": [
|
||||
"nexus_packages",
|
||||
{
|
||||
"name": "p_unapproved_reviews",
|
||||
"type": "INT",
|
||||
"length": 10,
|
||||
"decimals": null,
|
||||
"values": [],
|
||||
"allow_null": true,
|
||||
"default": null,
|
||||
"comment": "",
|
||||
"unsigned": true,
|
||||
"zerofill": false,
|
||||
"auto_increment": false,
|
||||
"binary": false
|
||||
}
|
||||
]
|
||||
},
|
||||
"2": {
|
||||
"method": "addColumn",
|
||||
"params": [
|
||||
"nexus_packages",
|
||||
{
|
||||
"name": "p_hidden_reviews",
|
||||
"type": "INT",
|
||||
"length": 10,
|
||||
"decimals": null,
|
||||
"values": [],
|
||||
"allow_null": true,
|
||||
"default": null,
|
||||
"comment": "",
|
||||
"unsigned": true,
|
||||
"zerofill": false,
|
||||
"auto_increment": false,
|
||||
"binary": false
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
Whitespace-only changes.
@@ -1,42 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* @brief 4.0.5 Upgrade Code
|
||||
* @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
|
||||
*/
|
||||
|
||||
namespace IPS\nexus\setup\upg_100028;
|
||||
|
||||
/* To prevent PHP errors (extending class does not exist) revealing path */
|
||||
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
{
|
||||
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
|
||||
exit;
|
||||
}
|
||||
|
||||
/**
|
||||
* 4.0.5 Upgrade Code
|
||||
*/
|
||||
class _Upgrade
|
||||
{
|
||||
|
||||
/**
|
||||
* Make sure all theme settings are applied to every theme.
|
||||
*
|
||||
* @return array 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 finish()
|
||||
{
|
||||
\IPS\core\Setup\Upgrade::repairFileUrls('nexus');
|
||||
\IPS\Task::queue( 'core', 'RebuildContentImages', array( 'class' => 'IPS\nexus\Package\Review' ), 3, array( 'class' ) );
|
||||
\IPS\Task::queue( 'core', 'RebuildNonContentImages', array( 'extension' => 'nexus_Admin' ), 3, array( 'extension' ) );
|
||||
\IPS\Task::queue( 'core', 'RebuildNonContentImages', array( 'extension' => 'nexus_Customer' ), 3, array( 'extension' ) );
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
}
|
||||
Whitespace-only changes.
@@ -1,42 +0,0 @@
|
||||
{
|
||||
"1": {
|
||||
"method": "addColumn",
|
||||
"params": [
|
||||
"nexus_packages",
|
||||
{
|
||||
"name": "p_grace_period",
|
||||
"type": "INT",
|
||||
"length": 10,
|
||||
"decimals": null,
|
||||
"values": [],
|
||||
"allow_null": true,
|
||||
"default": "0",
|
||||
"comment": "Grace period in days",
|
||||
"unsigned": true,
|
||||
"zerofill": false,
|
||||
"auto_increment": false,
|
||||
"binary": false
|
||||
}
|
||||
]
|
||||
},
|
||||
"2": {
|
||||
"method": "addColumn",
|
||||
"params": [
|
||||
"nexus_purchases",
|
||||
{
|
||||
"name": "ps_grace_period",
|
||||
"type": "INT",
|
||||
"length": 10,
|
||||
"decimals": null,
|
||||
"values": [],
|
||||
"allow_null": false,
|
||||
"default": "0",
|
||||
"comment": "Grace period in seconds",
|
||||
"unsigned": true,
|
||||
"zerofill": false,
|
||||
"auto_increment": false,
|
||||
"binary": false
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
Whitespace-only changes.
@@ -1,73 +0,0 @@
|
||||
{
|
||||
"1": {
|
||||
"method": "addColumn",
|
||||
"params": [
|
||||
"nexus_ship_orders",
|
||||
{
|
||||
"name": "o_shipped_date",
|
||||
"type": "INT",
|
||||
"length": 10,
|
||||
"allow_null": false
|
||||
}
|
||||
]
|
||||
},
|
||||
"2": {
|
||||
"method": "addColumn",
|
||||
"params": [
|
||||
"nexus_packages",
|
||||
{
|
||||
"name": "p_seo_name",
|
||||
"type": "VARCHAR",
|
||||
"length": 128,
|
||||
"allow_null": false
|
||||
}
|
||||
]
|
||||
},
|
||||
"3": {
|
||||
"method": "addColumn",
|
||||
"params": [
|
||||
"nexus_package_groups",
|
||||
{
|
||||
"name": "pg_seo_name",
|
||||
"type": "VARCHAR",
|
||||
"length": 32,
|
||||
"allow_null": false
|
||||
}
|
||||
]
|
||||
},
|
||||
"4": {
|
||||
"method": "addColumn",
|
||||
"params": [
|
||||
"nexus_adpacks",
|
||||
{
|
||||
"name": "ap_name",
|
||||
"type": "VARCHAR",
|
||||
"length": 128,
|
||||
"allow_null": false
|
||||
}
|
||||
]
|
||||
},
|
||||
"5": {
|
||||
"method": "addColumn",
|
||||
"params": [
|
||||
"nexus_support_departments",
|
||||
{
|
||||
"name": "dpt_notify",
|
||||
"type": "TEXT",
|
||||
"allow_null": false
|
||||
}
|
||||
]
|
||||
},
|
||||
"6": {
|
||||
"method": "addColumn",
|
||||
"params": [
|
||||
"nexus_support_departments",
|
||||
{
|
||||
"name": "dpt_notify_reply",
|
||||
"type": "TINYINT",
|
||||
"length": 1,
|
||||
"allow_null": false
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
Whitespace-only changes.
@@ -1,26 +0,0 @@
|
||||
{
|
||||
"1": {
|
||||
"method": "addColumn",
|
||||
"params": [
|
||||
"nexus_packages",
|
||||
{
|
||||
"name": "p_upsell",
|
||||
"type": "TINYINT",
|
||||
"length": 1,
|
||||
"allow_null": false
|
||||
}
|
||||
]
|
||||
},
|
||||
"2": {
|
||||
"method": "changeColumn",
|
||||
"params": [
|
||||
"nexus_tax",
|
||||
"t_rate",
|
||||
{
|
||||
"name": "t_rate",
|
||||
"type": "TEXT",
|
||||
"allow_null": false
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
Whitespace-only changes.
@@ -1,78 +0,0 @@
|
||||
{
|
||||
"1": {
|
||||
"method": "dropColumn",
|
||||
"params": [
|
||||
"nexus_shipping",
|
||||
"s_cost"
|
||||
]
|
||||
},
|
||||
"2": {
|
||||
"method": "dropColumn",
|
||||
"params": [
|
||||
"nexus_shipping",
|
||||
"s_weight"
|
||||
]
|
||||
},
|
||||
"3": {
|
||||
"method": "addColumn",
|
||||
"params": [
|
||||
"nexus_shipping",
|
||||
{
|
||||
"name": "s_locations",
|
||||
"type": "TEXT",
|
||||
"allow_null": false,
|
||||
"default": ""
|
||||
}
|
||||
]
|
||||
},
|
||||
"4": {
|
||||
"method": "addColumn",
|
||||
"params": [
|
||||
"nexus_shipping",
|
||||
{
|
||||
"name": "s_type",
|
||||
"type": "CHAR",
|
||||
"allow_null": false,
|
||||
"default": ""
|
||||
}
|
||||
]
|
||||
},
|
||||
"5": {
|
||||
"method": "addColumn",
|
||||
"params": [
|
||||
"nexus_shipping",
|
||||
{
|
||||
"name": "s_rates",
|
||||
"type": "TEXT",
|
||||
"allow_null": false,
|
||||
"default": ""
|
||||
}
|
||||
]
|
||||
},
|
||||
"6": {
|
||||
"method": "addColumn",
|
||||
"params": [
|
||||
"nexus_shipping",
|
||||
{
|
||||
"name": "s_tax",
|
||||
"type": "INT",
|
||||
"length": 5,
|
||||
"allow_null": false,
|
||||
"default": 0
|
||||
}
|
||||
]
|
||||
},
|
||||
"7": {
|
||||
"method": "addColumn",
|
||||
"params": [
|
||||
"nexus_purchases",
|
||||
{
|
||||
"name": "ps_invoice_pending",
|
||||
"type": "TINYINT",
|
||||
"length": 1,
|
||||
"allow_null": false,
|
||||
"default": 0
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
Whitespace-only changes.
@@ -1,28 +0,0 @@
|
||||
{
|
||||
"1": {
|
||||
"method": "addColumn",
|
||||
"params": [
|
||||
"nexus_support_requests",
|
||||
{
|
||||
"name": "r_staff_lock",
|
||||
"type": "TINYINT",
|
||||
"length": 1,
|
||||
"allow_null": false,
|
||||
"default": 0
|
||||
}
|
||||
]
|
||||
},
|
||||
"2": {
|
||||
"method": "changeColumn",
|
||||
"params": [
|
||||
"nexus_invoices",
|
||||
"i_title",
|
||||
{
|
||||
"name": "i_title",
|
||||
"type": "VARCHAR",
|
||||
"length": 128,
|
||||
"default": null
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
Whitespace-only changes.
@@ -1,93 +0,0 @@
|
||||
{
|
||||
"1": {
|
||||
"method": "insert",
|
||||
"params": [
|
||||
"core_incoming_emails",
|
||||
{
|
||||
"rule_criteria_field": "sbjt",
|
||||
"rule_criteria_type": "regx",
|
||||
"rule_criteria_value": "\\\\[SR\\\\d+-.+\\\\]",
|
||||
"rule_app": "nexus",
|
||||
"rule_added_by": 0,
|
||||
"rule_added_date": 0
|
||||
}
|
||||
]
|
||||
},
|
||||
"2": {
|
||||
"method": "addColumn",
|
||||
"params": [
|
||||
"nexus_support_requests",
|
||||
{
|
||||
"name": "r_email_key",
|
||||
"type": "CHAR",
|
||||
"length": 3
|
||||
}
|
||||
]
|
||||
},
|
||||
"3": {
|
||||
"method": "changeColumn",
|
||||
"params": [
|
||||
"nexus_paypal_subscriptions",
|
||||
"s_methos",
|
||||
{
|
||||
"name": "s_method",
|
||||
"type": "INT",
|
||||
"length": 5,
|
||||
"allow_null": false,
|
||||
"default": 0
|
||||
}
|
||||
]
|
||||
},
|
||||
"4": {
|
||||
"method": "changeColumn",
|
||||
"params": [
|
||||
"nexus_purchases",
|
||||
"ps_name",
|
||||
{
|
||||
"name": "ps_name",
|
||||
"type": "VARCHAR",
|
||||
"length": 128,
|
||||
"default": null
|
||||
}
|
||||
]
|
||||
},
|
||||
"5": {
|
||||
"method": "addColumn",
|
||||
"params": [
|
||||
"nexus_invoices",
|
||||
{
|
||||
"name": "i_noreminder",
|
||||
"type": "TINYINT",
|
||||
"length": 1,
|
||||
"allow_null": false,
|
||||
"default": 0
|
||||
}
|
||||
]
|
||||
},
|
||||
"6": {
|
||||
"method": "addIndex",
|
||||
"params": [
|
||||
"nexus_packages",
|
||||
{
|
||||
"type": "fulltext",
|
||||
"name": "p_name",
|
||||
"columns": [
|
||||
"p_name"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"7": {
|
||||
"method": "addIndex",
|
||||
"params": [
|
||||
"nexus_packages",
|
||||
{
|
||||
"type": "fulltext",
|
||||
"name": "p_desc",
|
||||
"columns": [
|
||||
"p_desc"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
Whitespace-only changes.
@@ -1,26 +0,0 @@
|
||||
{
|
||||
"1": {
|
||||
"method": "addColumn",
|
||||
"params": [
|
||||
"nexus_purchases",
|
||||
{
|
||||
"name": "ps_pay_to",
|
||||
"type": "MEDIUMINT",
|
||||
"length": 8,
|
||||
"default": null
|
||||
}
|
||||
]
|
||||
},
|
||||
"2": {
|
||||
"method": "addColumn",
|
||||
"params": [
|
||||
"nexus_purchases",
|
||||
{
|
||||
"name": "ps_commission",
|
||||
"type": "INT",
|
||||
"length": 2,
|
||||
"default": null
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
Whitespace-only changes.
@@ -1,109 +0,0 @@
|
||||
{
|
||||
"1": {
|
||||
"method": "createTable",
|
||||
"params": [
|
||||
{
|
||||
"name": "nexus_product_options",
|
||||
"columns": {
|
||||
"opt_id": {
|
||||
"allow_null": false,
|
||||
"auto_increment": true,
|
||||
"binary": false,
|
||||
"comment": "",
|
||||
"decimals": null,
|
||||
"default": null,
|
||||
"length": 10,
|
||||
"name": "opt_id",
|
||||
"type": "INT",
|
||||
"unsigned": false,
|
||||
"values": [],
|
||||
"zerofill": false
|
||||
},
|
||||
"opt_package": {
|
||||
"allow_null": true,
|
||||
"auto_increment": false,
|
||||
"binary": false,
|
||||
"comment": "",
|
||||
"decimals": null,
|
||||
"default": null,
|
||||
"length": 8,
|
||||
"name": "opt_package",
|
||||
"type": "INT",
|
||||
"unsigned": false,
|
||||
"values": [],
|
||||
"zerofill": false
|
||||
},
|
||||
"opt_values": {
|
||||
"allow_null": true,
|
||||
"auto_increment": false,
|
||||
"binary": false,
|
||||
"comment": "",
|
||||
"decimals": null,
|
||||
"default": null,
|
||||
"length": 0,
|
||||
"name": "opt_values",
|
||||
"type": "TEXT",
|
||||
"unsigned": false,
|
||||
"values": [],
|
||||
"zerofill": false
|
||||
},
|
||||
"opt_stock": {
|
||||
"allow_null": true,
|
||||
"auto_increment": false,
|
||||
"binary": false,
|
||||
"comment": "",
|
||||
"decimals": null,
|
||||
"default": null,
|
||||
"length": 10,
|
||||
"name": "opt_stock",
|
||||
"type": "INT",
|
||||
"unsigned": false,
|
||||
"values": [],
|
||||
"zerofill": false
|
||||
},
|
||||
"opt_base_price": {
|
||||
"allow_null": true,
|
||||
"auto_increment": false,
|
||||
"binary": false,
|
||||
"comment": "",
|
||||
"decimals": null,
|
||||
"default": null,
|
||||
"length": 0,
|
||||
"name": "opt_base_price",
|
||||
"type": "TEXT",
|
||||
"unsigned": false,
|
||||
"values": [],
|
||||
"zerofill": false
|
||||
},
|
||||
"opt_renew_price": {
|
||||
"allow_null": true,
|
||||
"auto_increment": false,
|
||||
"binary": false,
|
||||
"comment": "",
|
||||
"decimals": null,
|
||||
"default": null,
|
||||
"length": 0,
|
||||
"name": "opt_renew_price",
|
||||
"type": "TEXT",
|
||||
"unsigned": false,
|
||||
"values": [],
|
||||
"zerofill": false
|
||||
}
|
||||
},
|
||||
"indexes": {
|
||||
"PRIMARY": {
|
||||
"type": "primary",
|
||||
"name": "PRIMARY",
|
||||
"length": [
|
||||
null
|
||||
],
|
||||
"columns": [
|
||||
"opt_id"
|
||||
]
|
||||
}
|
||||
},
|
||||
"collation": "utf8mb4_unicode_ci"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
Whitespace-only changes.
@@ -1,257 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* @brief 4.0.99 Upgrade Code
|
||||
* @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
|
||||
*/
|
||||
|
||||
namespace IPS\nexus\setup\upg_101000;
|
||||
|
||||
/* To prevent PHP errors (extending class does not exist) revealing path */
|
||||
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
{
|
||||
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
|
||||
exit;
|
||||
}
|
||||
|
||||
/**
|
||||
* 4.0.99 Upgrade Code
|
||||
*/
|
||||
class _Upgrade
|
||||
{
|
||||
/**
|
||||
* Store certain informaiton in settings to ease performance on menu
|
||||
*
|
||||
* @return array 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 step1()
|
||||
{
|
||||
\IPS\Settings::i()->changeValues( array(
|
||||
'card_storage_gateways' => \count( \IPS\nexus\Gateway::cardStorageGateways() ),
|
||||
'donation_goals' => \count( \IPS\nexus\Donation\Goal::roots() ),
|
||||
'customer_fields' => \count( \IPS\nexus\Customer\CustomField::roots() )
|
||||
) );
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/**
|
||||
* Fix shipping methods
|
||||
*
|
||||
* @return array 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 step2()
|
||||
{
|
||||
if( !isset( \IPS\Settings::i()->nexus_currency ) )
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
$statesFrom3 = array(
|
||||
//'GB' => array( "LONDON" => 'London', "ESSEX" => 'Essex' ),
|
||||
'CA' => array(
|
||||
"ALBERTA" => "Alberta",
|
||||
"BRITISH COLUMBIA" => "British Columbia",
|
||||
"MANITOBA" => "Manitoba",
|
||||
"NEW BRUNSWICK" => "New Brunswick",
|
||||
"NEWFOUNDLAND AND LABRADOR" => "Newfoundland and Labrador",
|
||||
"NORTHWEST TERRITORIES" => "Northwest Territories",
|
||||
"NOVA SCOTIA" => "Nova Soctia",
|
||||
"NUNAVUT" => "Nunavut",
|
||||
"ONTARIO" => "Ontario",
|
||||
"PRINCE EDWARD ISLAND" => "Prince Edward Island",
|
||||
"QUEBEC" => "Quebec",
|
||||
"SASKATCHEWAN" => "Saskatchewan",
|
||||
"YUKON" => "Yukon",
|
||||
),
|
||||
'US' => array(
|
||||
'ALABAMA' => "AL",
|
||||
'ALASKA' => "AK",
|
||||
'AMERICAN SAMOA' => "AS",
|
||||
'ARIZONA' => "AZ",
|
||||
'ARKANSAS' => "AR",
|
||||
'CALIFORNIA' => "CA",
|
||||
'COLORADO' => "CO",
|
||||
'CONNECTICUT' => "CT",
|
||||
'DELAWARE' => "DE",
|
||||
'DISTRICT OF COLUMBIA' => "DC",
|
||||
'FEDERATED STATES OF MICRONESIA' => "FM",
|
||||
'FLORIDA' => "FL",
|
||||
'GEORGIA' => "GA",
|
||||
'GUAM' => "GU",
|
||||
'HAWAII' => "HI",
|
||||
'IDAHO' => "ID",
|
||||
'ILLINOIS' => "IL",
|
||||
'INDIANA' => "IN",
|
||||
'IOWA' => "IA",
|
||||
'KANSAS' => "KS",
|
||||
'KENTUCKY' => "KY",
|
||||
'LOUISIANA' => "LA",
|
||||
'MAINE' => "ME",
|
||||
'MARSHALL ISLANDS' => "MH",
|
||||
'MARYLAND' => "MD",
|
||||
'MASSACHUSETTS' => "MA",
|
||||
'MICHIGAN' => "MI",
|
||||
'MINNESOTA' => "MN",
|
||||
'MISSISSIPPI' => "MS",
|
||||
'MISSOURI' => "MO",
|
||||
'MONTANA' => "MT",
|
||||
'NEBRASKA' => "NE",
|
||||
'NEVADA' => "NV",
|
||||
'NEW HAMPSHIRE' => "NH",
|
||||
'NEW JERSEY' => "NJ",
|
||||
'NEW MEXICO' => "NM",
|
||||
'NEW YORK' => "NY",
|
||||
'NORTH CAROLINA' => "NC",
|
||||
'NORTH DAKOTA' => "ND",
|
||||
'NORTHERN MARIANA ISLANDS' => "MP",
|
||||
'OHIO' => "OH",
|
||||
'OKLAHOMA' => "OK",
|
||||
'OREGON' => "OR",
|
||||
'PALAU' => "PW",
|
||||
'PENNSYLVANIA' => "PA",
|
||||
'PUERTO RICO' => "PR",
|
||||
'RHODE ISLAND' => "RI",
|
||||
'SOUTH CAROLINA' => "SC",
|
||||
'SOUTH DAKOTA' => "SD",
|
||||
'TENNESSEE' => "TN",
|
||||
'TEXAS' => "TX",
|
||||
'UTAH' => "UT",
|
||||
'VERMONT' => "VT",
|
||||
'VIRGIN ISLANDS' => "VI",
|
||||
'VIRGINIA' => "VA",
|
||||
'WASHINGTON' => "WA",
|
||||
'WEST VIRGINIA' => "WV",
|
||||
'WISCONSIN' => "WI",
|
||||
'WYOMING' => "WY",
|
||||
'ARMED FORCES - AMERICAS' => "AA",
|
||||
'ARMED FORCES - EUROPE' => "AE",
|
||||
'ARMED FORCES - PACIFIC' => "AP",
|
||||
),
|
||||
'PT' => array(
|
||||
'AVEIRO' => "Aveiro",
|
||||
'AZORES' => "Azores",
|
||||
'BEJA' => "Beja",
|
||||
'BRAGA' => "Braga",
|
||||
'BRAGANCA' => "Braganca",
|
||||
'CASTELO BRANCO' => "Castelo Branco",
|
||||
'COIMBRA' => "Coimbra",
|
||||
'EVORA' => "Evora",
|
||||
'FARO' => "Faro",
|
||||
'GUARDA' => "Guarda",
|
||||
'LEIRIA' => "Leiria",
|
||||
'LISBOA' => "Lisboa",
|
||||
'MADEIRA ISLANDS' => "Madeira Islands",
|
||||
'PORTALEGRE' => "Portalegre",
|
||||
'PORTO' => "Porto",
|
||||
'SANTAREM' => "Santarem",
|
||||
'SETUBAL' => "Setubal",
|
||||
'VIANA DO CASTELO' => "Viana do Castelo",
|
||||
'VILA REAL' => "Vila Real",
|
||||
'VISEU' => "Viseu",
|
||||
),
|
||||
'AU' => array(
|
||||
'AUSTRALIAN CAPITAL TERRITORY' => 'ACT',
|
||||
'NEW SOUTH WALES' => 'NSW',
|
||||
'NORTHERN TERRITORY' => 'NT',
|
||||
'QUEENSLAND' => 'QLD',
|
||||
'SOUTH AUSTRALIA' => 'SA',
|
||||
'TASMANIA' => 'TAS',
|
||||
'VICTORIA' => 'VIC',
|
||||
'WESTERN AUSTRALIA' => 'WA',
|
||||
),
|
||||
);
|
||||
|
||||
$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 ) )
|
||||
{
|
||||
foreach ( $select as $row )
|
||||
{
|
||||
$update = array();
|
||||
|
||||
$decoded = json_decode( $row['s_rates'], TRUE );
|
||||
if( !empty( $decoded ) )
|
||||
{
|
||||
foreach ( $decoded as $k => $value )
|
||||
{
|
||||
if ( !isset( $value['min'] ) )
|
||||
{
|
||||
switch( $row['s_type'] )
|
||||
{
|
||||
// Number of items
|
||||
default:
|
||||
case 'q':
|
||||
$min = (int) $value['value'];
|
||||
break;
|
||||
// Invoice subtotal
|
||||
case 't':
|
||||
$min = array( \IPS\Settings::i()->nexus_currency => \floatval( $value['value'] ) );
|
||||
break;
|
||||
// Total weight of items
|
||||
case 'w':
|
||||
$min = \floatval( $value['value'] );
|
||||
break;
|
||||
}
|
||||
|
||||
$decoded[ $k ] = array(
|
||||
'min' => $min,
|
||||
'max' => isset( $decoded[ $k + 1 ] ) ? array( \IPS\Settings::i()->nexus_currency => \floatval( $decoded[ $k + 1 ]['value'] ) ) : '*',
|
||||
'price' => array( \IPS\Settings::i()->nexus_currency => \floatval( $value['cost'] ) )
|
||||
);
|
||||
}
|
||||
}
|
||||
if ( json_encode( $decoded ) != $row['s_rates'] )
|
||||
{
|
||||
$update['s_rates'] = json_encode( $decoded );
|
||||
}
|
||||
}
|
||||
|
||||
if ( $decoded = @\unserialize( $row['s_locations'] ) )
|
||||
{
|
||||
foreach ( $decoded as $countryCode => $locations )
|
||||
{
|
||||
/* 3.x treated a null value for locations as '*'. 4.x is much more strict over allowed values */
|
||||
if ( !$locations )
|
||||
{
|
||||
$locations = $decoded[ $countryCode ] = '*';
|
||||
}
|
||||
|
||||
if ( $locations != '*' and isset( $statesFrom3[ $countryCode ] ) and isset( \IPS\GeoLocation::$states[ $countryCode ] ) )
|
||||
{
|
||||
foreach ( $locations as $i => $location )
|
||||
{
|
||||
if ( !\in_array( $location, \IPS\GeoLocation::$states[ $countryCode ] ) )
|
||||
{
|
||||
if ( $key = array_search( $location, $statesFrom3[ $countryCode ] ) )
|
||||
{
|
||||
if ( $key = array_search( mb_strtolower( $key ), array_map( 'mb_strtolower', \IPS\GeoLocation::$states[ $countryCode ] ) ) )
|
||||
{
|
||||
$decoded[ $countryCode ][ $i ] = \IPS\GeoLocation::$states[ $countryCode ][ $key ];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
$update['s_locations'] = json_encode( $decoded );
|
||||
}
|
||||
|
||||
if ( !empty( $update ) )
|
||||
{
|
||||
\IPS\Db::i()->update( 'nexus_shipping', $update, array( 's_id=?', $row['s_id'] ) );
|
||||
}
|
||||
}
|
||||
|
||||
return $offset + 100;
|
||||
}
|
||||
else
|
||||
{
|
||||
unset( $_SESSION['_step16Count'] );
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
}
|
||||
Whitespace-only changes.
@@ -1,23 +0,0 @@
|
||||
{
|
||||
"1": {
|
||||
"method": "changeColumn",
|
||||
"params": [
|
||||
"nexus_transactions",
|
||||
"t_amount",
|
||||
{
|
||||
"name": "t_amount",
|
||||
"type": "DECIMAL",
|
||||
"length": 20,
|
||||
"decimals": 2,
|
||||
"values": [],
|
||||
"allow_null": false,
|
||||
"default": "0",
|
||||
"comment": "",
|
||||
"unsigned": false,
|
||||
"zerofill": false,
|
||||
"auto_increment": false,
|
||||
"binary": false
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
Whitespace-only changes.
@@ -1,23 +0,0 @@
|
||||
{
|
||||
"1": {
|
||||
"method": "changeColumn",
|
||||
"params": [
|
||||
"nexus_purchases",
|
||||
"ps_renewal_price",
|
||||
{
|
||||
"name": "ps_renewal_price",
|
||||
"type": "DECIMAL",
|
||||
"length": 20,
|
||||
"decimals": 2,
|
||||
"values": [],
|
||||
"allow_null": false,
|
||||
"default": "0",
|
||||
"comment": "",
|
||||
"unsigned": false,
|
||||
"zerofill": false,
|
||||
"auto_increment": false,
|
||||
"binary": false
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
Whitespace-only changes.
@@ -1,111 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* @brief 4.1.5 Upgrade Code
|
||||
* @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
|
||||
*/
|
||||
|
||||
namespace IPS\nexus\setup\upg_101017;
|
||||
|
||||
/* To prevent PHP errors (extending class does not exist) revealing path */
|
||||
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
{
|
||||
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
|
||||
exit;
|
||||
}
|
||||
|
||||
/**
|
||||
* 4.1.5 Upgrade Code
|
||||
*/
|
||||
class _Upgrade
|
||||
{
|
||||
/**
|
||||
* Fix nexus_package_base_prices
|
||||
*
|
||||
* @return array 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 step1()
|
||||
{
|
||||
$offset = isset( \IPS\Request::i()->extra ) ? \IPS\Request::i()->extra : 0;
|
||||
|
||||
if ( !$offset )
|
||||
{
|
||||
\IPS\Db::i()->dropTable( 'nexus_package_base_prices', TRUE );
|
||||
|
||||
$schema = array(
|
||||
'name' => 'nexus_package_base_prices',
|
||||
'columns' => array(
|
||||
'id' => array(
|
||||
'name' => 'id',
|
||||
'type' => 'BIGINT',
|
||||
'length' => '20',
|
||||
'unsigned' => true,
|
||||
'zerofill' => false,
|
||||
'binary' => false,
|
||||
'allow_null' => false,
|
||||
'default' => NULL,
|
||||
'auto_increment' => true,
|
||||
),
|
||||
),
|
||||
'indexes' => array(
|
||||
'PRIMARY' => array (
|
||||
'type' => 'primary',
|
||||
'name' => 'PRIMARY',
|
||||
'columns' => array( 'id' )
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
foreach ( \IPS\nexus\Money::currencies() as $currency )
|
||||
{
|
||||
$schema['columns'][ $currency ] = array(
|
||||
'name' => $currency,
|
||||
'type' => 'FLOAT'
|
||||
);
|
||||
}
|
||||
|
||||
\IPS\Db::i()->createTable( $schema );
|
||||
}
|
||||
|
||||
$select = \IPS\Db::i()->select( '*', 'nexus_packages', NULL, 'p_id', array( $offset, 100 ) );
|
||||
if ( \count( $select ) )
|
||||
{
|
||||
foreach ( $select as $row )
|
||||
{
|
||||
$basePrices = json_decode( $row['p_base_price'], TRUE );
|
||||
|
||||
$insert = array( 'id' => $row['p_id'] );
|
||||
foreach ( \IPS\nexus\Money::currencies() as $currency )
|
||||
{
|
||||
if ( isset( $basePrices[ $currency ] ) )
|
||||
{
|
||||
$insert[ $currency ] = $basePrices[ $currency ]['amount'];
|
||||
}
|
||||
else
|
||||
{
|
||||
$insert[ $currency ] = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
\IPS\Db::i()->insert( 'nexus_package_base_prices', $insert );
|
||||
}
|
||||
|
||||
return $offset + 100;
|
||||
}
|
||||
else
|
||||
{
|
||||
unset( $_SESSION['_step1Count'] );
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
// You can create as many additional methods (step2, step3, etc.) as is necessary.
|
||||
// Each step will be executed in a new HTTP request
|
||||
}
|
||||
Whitespace-only changes.
@@ -1,255 +0,0 @@
|
||||
{
|
||||
"1": {
|
||||
"method": "createTable",
|
||||
"params": [
|
||||
{
|
||||
"name": "nexus_support_severities",
|
||||
"columns": {
|
||||
"sev_id": {
|
||||
"allow_null": false,
|
||||
"auto_increment": true,
|
||||
"binary": false,
|
||||
"comment": "",
|
||||
"decimals": null,
|
||||
"default": null,
|
||||
"length": 5,
|
||||
"name": "sev_id",
|
||||
"type": "INT",
|
||||
"unsigned": false,
|
||||
"values": [],
|
||||
"zerofill": false
|
||||
},
|
||||
"sev_name": {
|
||||
"allow_null": true,
|
||||
"auto_increment": false,
|
||||
"binary": false,
|
||||
"comment": "",
|
||||
"decimals": null,
|
||||
"default": null,
|
||||
"length": 255,
|
||||
"name": "sev_name",
|
||||
"type": "VARCHAR",
|
||||
"unsigned": false,
|
||||
"values": [],
|
||||
"zerofill": false
|
||||
},
|
||||
"sev_icon": {
|
||||
"allow_null": true,
|
||||
"auto_increment": false,
|
||||
"binary": false,
|
||||
"comment": "",
|
||||
"decimals": null,
|
||||
"default": null,
|
||||
"length": 0,
|
||||
"name": "sev_icon",
|
||||
"type": "TEXT",
|
||||
"unsigned": false,
|
||||
"values": [],
|
||||
"zerofill": false
|
||||
},
|
||||
"sev_color": {
|
||||
"allow_null": true,
|
||||
"auto_increment": false,
|
||||
"binary": false,
|
||||
"comment": "",
|
||||
"decimals": null,
|
||||
"default": null,
|
||||
"length": 6,
|
||||
"name": "sev_color",
|
||||
"type": "CHAR",
|
||||
"unsigned": false,
|
||||
"values": [],
|
||||
"zerofill": false
|
||||
},
|
||||
"sev_default": {
|
||||
"allow_null": true,
|
||||
"auto_increment": false,
|
||||
"binary": false,
|
||||
"comment": "",
|
||||
"decimals": null,
|
||||
"default": null,
|
||||
"length": 1,
|
||||
"name": "sev_default",
|
||||
"type": "TINYINT",
|
||||
"unsigned": false,
|
||||
"values": [],
|
||||
"zerofill": false
|
||||
},
|
||||
"sev_public": {
|
||||
"allow_null": true,
|
||||
"auto_increment": false,
|
||||
"binary": false,
|
||||
"comment": "",
|
||||
"decimals": null,
|
||||
"default": null,
|
||||
"length": 1,
|
||||
"name": "sev_public",
|
||||
"type": "TINYINT",
|
||||
"unsigned": false,
|
||||
"values": [],
|
||||
"zerofill": false
|
||||
},
|
||||
"sev_position": {
|
||||
"allow_null": true,
|
||||
"auto_increment": false,
|
||||
"binary": false,
|
||||
"comment": "",
|
||||
"decimals": null,
|
||||
"default": null,
|
||||
"length": 5,
|
||||
"name": "sev_position",
|
||||
"type": "INT",
|
||||
"unsigned": false,
|
||||
"values": [],
|
||||
"zerofill": false
|
||||
},
|
||||
"sev_action": {
|
||||
"allow_null": true,
|
||||
"auto_increment": false,
|
||||
"binary": false,
|
||||
"comment": "",
|
||||
"decimals": null,
|
||||
"default": null,
|
||||
"length": 255,
|
||||
"name": "sev_action",
|
||||
"type": "VARCHAR",
|
||||
"unsigned": false,
|
||||
"values": [],
|
||||
"zerofill": false
|
||||
}
|
||||
},
|
||||
"indexes": {
|
||||
"PRIMARY": {
|
||||
"type": "primary",
|
||||
"name": "PRIMARY",
|
||||
"length": [
|
||||
null
|
||||
],
|
||||
"columns": [
|
||||
"sev_id"
|
||||
]
|
||||
}
|
||||
},
|
||||
"collation": "utf8mb4_unicode_ci"
|
||||
}
|
||||
]
|
||||
},
|
||||
"2": {
|
||||
"method": "insert",
|
||||
"params": [
|
||||
"nexus_support_severities",
|
||||
{
|
||||
"sev_id": 1,
|
||||
"sev_name": "Normal",
|
||||
"sev_icon": null,
|
||||
"sev_color": "000000",
|
||||
"sev_default": 1,
|
||||
"sev_public": 1,
|
||||
"sev_position": null,
|
||||
"sev_action": ""
|
||||
}
|
||||
]
|
||||
},
|
||||
"3": {
|
||||
"method": "addColumn",
|
||||
"params": [
|
||||
"nexus_support_requests",
|
||||
{
|
||||
"name": "r_severity",
|
||||
"type": "int",
|
||||
"length": 5,
|
||||
"allow_null": true,
|
||||
"default": 0
|
||||
}
|
||||
]
|
||||
},
|
||||
"4": {
|
||||
"method": "addColumn",
|
||||
"params": [
|
||||
"nexus_packages",
|
||||
{
|
||||
"name": "p_support_severity",
|
||||
"type": "int",
|
||||
"length": 5,
|
||||
"allow_null": true,
|
||||
"default": 0
|
||||
}
|
||||
]
|
||||
},
|
||||
"5": {
|
||||
"method": "addColumn",
|
||||
"params": [
|
||||
"core_members",
|
||||
{
|
||||
"name": "cm_no_sev",
|
||||
"type": "tinyint",
|
||||
"length": 1,
|
||||
"allow_null": true,
|
||||
"default": 0
|
||||
}
|
||||
]
|
||||
},
|
||||
"6": {
|
||||
"method": "changeColumn",
|
||||
"params": [
|
||||
"nexus_package_groups",
|
||||
"pg_name",
|
||||
{
|
||||
"name": "pg_name",
|
||||
"type": "VARCHAR",
|
||||
"length": 255
|
||||
}
|
||||
]
|
||||
},
|
||||
"7": {
|
||||
"method": "addColumn",
|
||||
"params": [
|
||||
"nexus_packages",
|
||||
{
|
||||
"name": "p_notify",
|
||||
"type": "TEXT",
|
||||
"default": null
|
||||
}
|
||||
]
|
||||
},
|
||||
"8": {
|
||||
"method": "addColumn",
|
||||
"params": [
|
||||
"nexus_adpacks",
|
||||
{
|
||||
"name": "ap_max_height",
|
||||
"type": "INT",
|
||||
"length": 3
|
||||
}
|
||||
]
|
||||
},
|
||||
"9": {
|
||||
"method": "addColumn",
|
||||
"params": [
|
||||
"nexus_adpacks",
|
||||
{
|
||||
"name": "ap_max_width",
|
||||
"type": "INT",
|
||||
"length": 3
|
||||
}
|
||||
]
|
||||
},
|
||||
"10": {
|
||||
"method": "update",
|
||||
"params": [
|
||||
"nexus_adpacks",
|
||||
{
|
||||
"ap_max_height": -1
|
||||
}
|
||||
]
|
||||
},
|
||||
"11": {
|
||||
"method": "update",
|
||||
"params": [
|
||||
"nexus_adpacks",
|
||||
{
|
||||
"ap_max_width": -1
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
Whitespace-only changes.
@@ -1,162 +0,0 @@
|
||||
{
|
||||
"1": {
|
||||
"method": "createTable",
|
||||
"params": [
|
||||
{
|
||||
"name": "nexus_billing_agreements",
|
||||
"columns": {
|
||||
"ba_id": {
|
||||
"name": "ba_id",
|
||||
"type": "BIGINT",
|
||||
"length": 20,
|
||||
"decimals": null,
|
||||
"values": null,
|
||||
"allow_null": false,
|
||||
"default": null,
|
||||
"comment": "ID Number",
|
||||
"unsigned": true,
|
||||
"zerofill": false,
|
||||
"auto_increment": true,
|
||||
"binary": false
|
||||
},
|
||||
"ba_gw_id": {
|
||||
"name": "ba_gw_id",
|
||||
"type": "VARCHAR",
|
||||
"length": 255,
|
||||
"decimals": null,
|
||||
"values": null,
|
||||
"allow_null": true,
|
||||
"default": null,
|
||||
"comment": "The ID assigned by the gateway",
|
||||
"unsigned": false,
|
||||
"zerofill": false,
|
||||
"auto_increment": false,
|
||||
"binary": false
|
||||
},
|
||||
"ba_method": {
|
||||
"name": "ba_method",
|
||||
"type": "INT",
|
||||
"length": 5,
|
||||
"decimals": null,
|
||||
"values": null,
|
||||
"allow_null": false,
|
||||
"default": null,
|
||||
"comment": "Payment method ID",
|
||||
"unsigned": true,
|
||||
"zerofill": false,
|
||||
"auto_increment": false,
|
||||
"binary": false
|
||||
},
|
||||
"ba_member": {
|
||||
"name": "ba_member",
|
||||
"type": "MEDIUMINT",
|
||||
"length": 8,
|
||||
"decimals": null,
|
||||
"values": null,
|
||||
"allow_null": true,
|
||||
"default": null,
|
||||
"comment": "Customer ID",
|
||||
"unsigned": true,
|
||||
"zerofill": false,
|
||||
"auto_increment": false,
|
||||
"binary": false
|
||||
},
|
||||
"ba_started": {
|
||||
"name": "ba_started",
|
||||
"type": "INT",
|
||||
"length": 10,
|
||||
"decimals": null,
|
||||
"values": null,
|
||||
"allow_null": false,
|
||||
"default": null,
|
||||
"comment": "Unix timestamp of when billing agreement was created",
|
||||
"unsigned": false,
|
||||
"zerofill": false,
|
||||
"auto_increment": false,
|
||||
"binary": false
|
||||
},
|
||||
"ba_next_cycle": {
|
||||
"name": "ba_next_cycle",
|
||||
"type": "INT",
|
||||
"length": 10,
|
||||
"decimals": null,
|
||||
"values": null,
|
||||
"allow_null": true,
|
||||
"default": null,
|
||||
"comment": "Timestamp of when the next payment will be made or NULL if there was an error last time",
|
||||
"unsigned": false,
|
||||
"zerofill": false,
|
||||
"auto_increment": false,
|
||||
"binary": false
|
||||
},
|
||||
"ba_canceled": {
|
||||
"name": "ba_canceled",
|
||||
"type": "TINYINT",
|
||||
"length": 1,
|
||||
"decimals": null,
|
||||
"values": null,
|
||||
"allow_null": false,
|
||||
"default": "0",
|
||||
"comment": "If the agreement has been canceled",
|
||||
"unsigned": true,
|
||||
"zerofill": false,
|
||||
"auto_increment": false,
|
||||
"binary": false
|
||||
}
|
||||
},
|
||||
"indexes": {
|
||||
"PRIMARY": {
|
||||
"type": "primary",
|
||||
"name": "PRIMARY",
|
||||
"columns": [
|
||||
"ba_id"
|
||||
],
|
||||
"length": [
|
||||
null
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"2": {
|
||||
"method": "addColumn",
|
||||
"params": [
|
||||
"nexus_transactions",
|
||||
{
|
||||
"name": "t_billing_agreement",
|
||||
"type": "BIGINT",
|
||||
"length": 20,
|
||||
"decimals": null,
|
||||
"values": null,
|
||||
"allow_null": true,
|
||||
"default": null,
|
||||
"comment": "If the transaction is part of a billing agreement, its ID",
|
||||
"unsigned": true,
|
||||
"zerofill": false,
|
||||
"auto_increment": false,
|
||||
"binary": false
|
||||
}
|
||||
]
|
||||
},
|
||||
"3": {
|
||||
"method": "addColumn",
|
||||
"params": [
|
||||
"nexus_purchases",
|
||||
{
|
||||
"name": "ps_billing_agreement",
|
||||
"type": "BIGINT",
|
||||
"length": 20,
|
||||
"decimals": null,
|
||||
"values": null,
|
||||
"allow_null": true,
|
||||
"default": null,
|
||||
"comment": "If paid by a billing agreement, its ID",
|
||||
"unsigned": true,
|
||||
"zerofill": false,
|
||||
"auto_increment": false,
|
||||
"binary": false
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -1,101 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* @brief 4.1.6 Upgrade Code
|
||||
* @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
|
||||
*/
|
||||
|
||||
namespace IPS\nexus\setup\upg_101021;
|
||||
|
||||
/* To prevent PHP errors (extending class does not exist) revealing path */
|
||||
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
{
|
||||
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
|
||||
exit;
|
||||
}
|
||||
|
||||
/**
|
||||
* 4.1.6 Upgrade Code
|
||||
*/
|
||||
class _Upgrade
|
||||
{
|
||||
/**
|
||||
* Fix Pending Invoices
|
||||
*
|
||||
* @return array 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 step1()
|
||||
{
|
||||
$perCycle = 500;
|
||||
$did = 0;
|
||||
$limit = \intval( \IPS\Request::i()->extra );
|
||||
$cutOff = \IPS\core\Setup\Upgrade::determineCutoff();
|
||||
|
||||
foreach( \IPS\Db::i()->select( '*', 'nexus_purchases', array( 'ps_invoice_pending!=?', 0 ), 'ps_id', array( $limit, $perCycle ) ) as $row )
|
||||
{
|
||||
if( $cutOff !== null AND time() >= $cutOff )
|
||||
{
|
||||
return ( $limit + $did );
|
||||
}
|
||||
|
||||
$did++;
|
||||
|
||||
/* If this invoice doesn't exist, update the row */
|
||||
try
|
||||
{
|
||||
$pendingInvoice = \IPS\nexus\Invoice::load( $row['ps_invoice_pending'] );
|
||||
}
|
||||
catch( \OutOfRangeException $e )
|
||||
{
|
||||
\IPS\Db::i()->update( 'nexus_purchases', array( 'ps_invoice_pending' => 0 ), array( "ps_id=?", $row['ps_id'] ) );
|
||||
continue;
|
||||
}
|
||||
|
||||
/* If this purchase is listed in the list of renewal_ids, do nothing - the invoice is correct. */
|
||||
if ( \in_array( $row['ps_id'], $pendingInvoice->renewal_ids ) )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
/* Otherwise, let's try and work it out. */
|
||||
try
|
||||
{
|
||||
$pendingInvoice = \IPS\nexus\Invoice::constructFromData( \IPS\Db::i()->select( '*', 'nexus_invoices', array( 'i_status=? AND ' . \IPS\Db::i()->findInSet( 'i_renewal_ids', array( $row['ps_id'] ) ), \IPS\nexus\Invoice::STATUS_PENDING ) )->first() );
|
||||
|
||||
/* It is - update the row. */
|
||||
\IPS\Db::i()->update( 'nexus_purchases', array( 'ps_invoice_pending' => $pendingInvoice->id, 'ps_invoice_warning_sent' => 1 ), array( "ps_id=?", $row['ps_id'] ) );
|
||||
}
|
||||
catch( \UnderflowException $e )
|
||||
{
|
||||
/* No invoice exists. */
|
||||
\IPS\Db::i()->update( 'nexus_purchases', array( 'ps_invoice_pending' => 0 ), array( "ps_id=?", $row['ps_id'] ) );
|
||||
}
|
||||
}
|
||||
|
||||
if( $did )
|
||||
{
|
||||
return ( $limit + $did );
|
||||
}
|
||||
else
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/**
|
||||
* Store certain informaiton in settings to ease performance on menu
|
||||
*
|
||||
* @return array 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 step2()
|
||||
{
|
||||
\IPS\Settings::i()->changeValues( array( 'billing_agreement_gateways' => \count( \IPS\nexus\Gateway::billingAgreementGateways() ) ) );
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
Whitespace-only changes.
@@ -1,111 +0,0 @@
|
||||
{
|
||||
"1": {
|
||||
"method": "createTable",
|
||||
"params": [
|
||||
{
|
||||
"name": "nexus_cart_uploads",
|
||||
"columns": {
|
||||
"id": {
|
||||
"name": "id",
|
||||
"type": "BIGINT",
|
||||
"length": "20",
|
||||
"unsigned": true,
|
||||
"zerofill": false,
|
||||
"binary": false,
|
||||
"allow_null": false,
|
||||
"default": null,
|
||||
"auto_increment": true,
|
||||
"comment": "ID Number"
|
||||
},
|
||||
"session_id": {
|
||||
"name": "session_id",
|
||||
"type": "VARCHAR",
|
||||
"length": 128,
|
||||
"decimals": null,
|
||||
"values": null,
|
||||
"allow_null": false,
|
||||
"default": null,
|
||||
"comment": "The session ID which uploaded the file",
|
||||
"unsigned": false,
|
||||
"zerofill": false,
|
||||
"auto_increment": false,
|
||||
"binary": false
|
||||
},
|
||||
"time": {
|
||||
"name": "time",
|
||||
"type": "INT",
|
||||
"length": 10,
|
||||
"decimals": null,
|
||||
"values": null,
|
||||
"allow_null": true,
|
||||
"default": null,
|
||||
"comment": "Unix timestamp of when the file was uploaded",
|
||||
"unsigned": false,
|
||||
"zerofill": false,
|
||||
"auto_increment": false,
|
||||
"binary": false
|
||||
},
|
||||
"item_id": {
|
||||
"name": "item_id",
|
||||
"type": "INT",
|
||||
"length": 10,
|
||||
"decimals": null,
|
||||
"values": null,
|
||||
"allow_null": true,
|
||||
"default": null,
|
||||
"comment": "The ID number of the item in the cart",
|
||||
"unsigned": true,
|
||||
"zerofill": false,
|
||||
"auto_increment": false,
|
||||
"binary": false
|
||||
}
|
||||
},
|
||||
"indexes": {
|
||||
"PRIMARY": {
|
||||
"type": "primary",
|
||||
"name": "PRIMARY",
|
||||
"columns": [
|
||||
"id"
|
||||
],
|
||||
"length": [
|
||||
null
|
||||
]
|
||||
},
|
||||
"session_id": {
|
||||
"type": "key",
|
||||
"name": "session_id",
|
||||
"columns": [
|
||||
"session_id"
|
||||
],
|
||||
"length": [
|
||||
null
|
||||
]
|
||||
},
|
||||
"time": {
|
||||
"type": "key",
|
||||
"name": "time",
|
||||
"columns": [
|
||||
"time"
|
||||
],
|
||||
"length": [
|
||||
null
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"2": {
|
||||
"method": "update",
|
||||
"params": [
|
||||
"core_attachments_map",
|
||||
{
|
||||
"id3": "purchase"
|
||||
},
|
||||
[
|
||||
"location_key=? AND id3 IS NULL",
|
||||
"nexus_Purchases"
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -1,78 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* @brief 4.1.9 Upgrade Code
|
||||
* @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
|
||||
*/
|
||||
|
||||
namespace IPS\nexus\setup\upg_101026;
|
||||
|
||||
/* To prevent PHP errors (extending class does not exist) revealing path */
|
||||
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
{
|
||||
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
|
||||
exit;
|
||||
}
|
||||
|
||||
/**
|
||||
* 4.1.9 Upgrade Code
|
||||
*/
|
||||
class _Upgrade
|
||||
{
|
||||
/**
|
||||
* Fix Customer Addresses
|
||||
*
|
||||
* @return array 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 step1()
|
||||
{
|
||||
$perCycle = 500;
|
||||
$did = 0;
|
||||
$limit = \intval( \IPS\Request::i()->extra );
|
||||
$cutOff = \IPS\core\Setup\Upgrade::determineCutoff();
|
||||
|
||||
foreach( \IPS\Db::i()->select( '*', 'nexus_customer_addresses', array(), NULL, array( $limit, $perCycle ) ) as $row )
|
||||
{
|
||||
if( $cutOff !== null AND time() >= $cutOff )
|
||||
{
|
||||
return ( $limit + $did );
|
||||
}
|
||||
|
||||
$did++;
|
||||
|
||||
$address = json_decode( $row['address'], TRUE );
|
||||
|
||||
if( $address['addressLines'][0] == NULL )
|
||||
{
|
||||
array_shift( $address['addressLines'] );
|
||||
\IPS\Db::i()->update( 'nexus_customer_addresses', array( 'address' => json_encode( $address ) ), array( 'id=?', $row['id'] ) );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if( $did )
|
||||
{
|
||||
return ( $limit + $did );
|
||||
}
|
||||
else
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/**
|
||||
* Custom title for this step
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function step1CustomTitle()
|
||||
{
|
||||
return "Fixing customer addresses";
|
||||
}
|
||||
}
|
||||
Whitespace-only changes.
@@ -1,39 +0,0 @@
|
||||
{
|
||||
"1": {
|
||||
"method": "addColumn",
|
||||
"params": [
|
||||
"nexus_ads",
|
||||
{
|
||||
"name": "ad_start",
|
||||
"type": "INT",
|
||||
"length": 10,
|
||||
"allow_null": false,
|
||||
"default": 0
|
||||
}
|
||||
]
|
||||
},
|
||||
"2": {
|
||||
"method": "addColumn",
|
||||
"params": [
|
||||
"nexus_ads",
|
||||
{
|
||||
"name": "ad_end",
|
||||
"type": "INT",
|
||||
"length": 10,
|
||||
"allow_null": false,
|
||||
"default": 0
|
||||
}
|
||||
]
|
||||
},
|
||||
"3": {
|
||||
"method": "addColumn",
|
||||
"params": [
|
||||
"nexus_adpacks",
|
||||
{
|
||||
"name": "ap_desc",
|
||||
"type": "TEXT",
|
||||
"default": null
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
Whitespace-only changes.
@@ -1,93 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* @brief 4.1.13 Upgrade Code
|
||||
* @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
|
||||
*/
|
||||
|
||||
namespace IPS\nexus\setup\upg_101034;
|
||||
|
||||
/* To prevent PHP errors (extending class does not exist) revealing path */
|
||||
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
{
|
||||
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
|
||||
exit;
|
||||
}
|
||||
|
||||
/**
|
||||
* 4.1.13 Upgrade Code
|
||||
*/
|
||||
class _Upgrade
|
||||
{
|
||||
/**
|
||||
* Fix donation goal tallies
|
||||
*
|
||||
* @return array 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 step1()
|
||||
{
|
||||
$toRun = \IPS\core\Setup\Upgrade::runManualQueries( array( array(
|
||||
'table' => 'nexus_donate_logs',
|
||||
'query' => "UPDATE " . \IPS\Db::i()->prefix . "nexus_donate_goals SET d_current=COALESCE( (SELECT SUM(dl_amount) FROM " . \IPS\Db::i()->prefix . "nexus_donate_logs WHERE " . \IPS\Db::i()->prefix . "nexus_donate_logs.dl_goal=" . \IPS\Db::i()->prefix . "nexus_donate_goals.d_id), 0)"
|
||||
) ) );
|
||||
|
||||
if ( \count( $toRun ) )
|
||||
{
|
||||
\IPS\core\Setup\Upgrade::adjustMultipleRedirect( array( 1 => 'nexus', 'extra' => array( '_upgradeStep' => 2 ) ) );
|
||||
|
||||
/* Queries to run manually */
|
||||
return array( 'html' => \IPS\Theme::i()->getTemplate( 'forms' )->queries( $toRun, \IPS\Http\Url::internal( 'controller=upgrade' )->setQueryString( array( 'key' => $_SESSION['uniqueKey'], 'mr_continue' => 1, 'mr' => \IPS\Request::i()->mr ) ) ) );
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/**
|
||||
* Custom title for this step
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function step1CustomTitle()
|
||||
{
|
||||
return "Adjusting commerce donation goals";
|
||||
}
|
||||
|
||||
/**
|
||||
* Fix old support requests that may not have a severity set
|
||||
*
|
||||
* @return array 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 step2()
|
||||
{
|
||||
$defaultSeverity = \IPS\nexus\Support\Severity::load( TRUE, 'sev_default' );
|
||||
|
||||
$toRun = \IPS\core\Setup\Upgrade::runManualQueries( array( array(
|
||||
'table' => 'nexus_support_requests',
|
||||
'query' => "UPDATE " . \IPS\Db::i()->prefix . "nexus_support_requests SET r_severity={$defaultSeverity->id} WHERE r_severity=0"
|
||||
) ) );
|
||||
|
||||
if ( \count( $toRun ) )
|
||||
{
|
||||
\IPS\core\Setup\Upgrade::adjustMultipleRedirect( array( 1 => 'nexus', 'extra' => array( '_upgradeStep' => 3 ) ) );
|
||||
|
||||
/* Queries to run manually */
|
||||
return array( 'html' => \IPS\Theme::i()->getTemplate( 'forms' )->queries( $toRun, \IPS\Http\Url::internal( 'controller=upgrade' )->setQueryString( array( 'key' => $_SESSION['uniqueKey'], 'mr_continue' => 1, 'mr' => \IPS\Request::i()->mr ) ) ) );
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/**
|
||||
* Custom title for this step
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function step2CustomTitle()
|
||||
{
|
||||
return "Updating support request severities";
|
||||
}
|
||||
}
|
||||
Whitespace-only changes.
@@ -1,26 +0,0 @@
|
||||
{
|
||||
"1": {
|
||||
"method": "addColumn",
|
||||
"params": [
|
||||
"nexus_purchases",
|
||||
{
|
||||
"name": "ps_original_invoice",
|
||||
"type": "INT",
|
||||
"length": 10,
|
||||
"allow_null": false,
|
||||
"default": 0
|
||||
}
|
||||
]
|
||||
},
|
||||
"2": {
|
||||
"method": "addColumn",
|
||||
"params": [
|
||||
"nexus_invoices",
|
||||
{
|
||||
"name": "i_renewal_ids",
|
||||
"type": "TEXT",
|
||||
"default": null
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -1,79 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* @brief 1.1.0 Alpha 5 Upgrade Code
|
||||
* @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
|
||||
*/
|
||||
|
||||
namespace IPS\nexus\setup\upg_10104;
|
||||
|
||||
/* To prevent PHP errors (extending class does not exist) revealing path */
|
||||
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
{
|
||||
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
|
||||
exit;
|
||||
}
|
||||
|
||||
/**
|
||||
* 1.1.0 Alpha 5 Upgrade Code
|
||||
*/
|
||||
class _Upgrade
|
||||
{
|
||||
/**
|
||||
* Add renewal IDs to invoices
|
||||
*
|
||||
* @return array 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 step1()
|
||||
{
|
||||
$offset = isset( \IPS\Request::i()->extra ) ? \intval( \IPS\Request::i()->extra ) : 0;
|
||||
$pergo = 50;
|
||||
$select = \IPS\Db::i()->select( '*', 'nexus_invoices', NULL, 'i_id', array( $offset, $pergo ) );
|
||||
if ( \count( $select ) )
|
||||
{
|
||||
foreach ( $select as $row )
|
||||
{
|
||||
$items = \unserialize( $row['i_items'] );
|
||||
$renewalIds = array();
|
||||
if ( \is_array( $items ) )
|
||||
{
|
||||
foreach ( $items as $i )
|
||||
{
|
||||
/* New Purchase */
|
||||
if ( $row['i_member'] and $row['i_status'] == 'paid' and $i['act'] == 'new' )
|
||||
{
|
||||
$purchases = array();
|
||||
foreach ( \IPS\Db::i()->select( '*', 'nexus_purchases', "ps_member='{$row['i_member']}' AND ps_app='{$i['app']}' AND ps_type='{$i['type']}' AND ps_item_id='{$i['itemID']}' AND ps_start={$row['i_paid']}" ) as $p )
|
||||
{
|
||||
$purchases[] = $p['ps_id'];
|
||||
}
|
||||
|
||||
if ( !empty( $purchases ) )
|
||||
{
|
||||
\IPS\Db::i()->update( 'nexus_purchases', array( 'ps_original_invoice' => $row['i_id'] ), 'ps_id IN(' . implode( ',', $purchases ) . ')' );
|
||||
}
|
||||
}
|
||||
|
||||
/* Renewal */
|
||||
elseif ( $i['act'] != 'new' and $i['act'] != 'charge' )
|
||||
{
|
||||
$renewalIds[] = $i['itemID'];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
\IPS\Db::i()->update( 'nexus_invoices', array( 'i_renewal_ids' => implode( ',', $renewalIds ) ), "i_id={$row['i_id']}" );
|
||||
}
|
||||
|
||||
return $offset + $pergo;
|
||||
}
|
||||
else
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
}
|
||||
Whitespace-only changes.
@@ -1,75 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* @brief 4.1.14 Upgrade Code
|
||||
* @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
|
||||
*/
|
||||
|
||||
namespace IPS\nexus\setup\upg_101042;
|
||||
|
||||
/* To prevent PHP errors (extending class does not exist) revealing path */
|
||||
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
{
|
||||
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
|
||||
exit;
|
||||
}
|
||||
|
||||
/**
|
||||
* 4.1.14 Upgrade Code
|
||||
*/
|
||||
class _Upgrade
|
||||
{
|
||||
/**
|
||||
* The upgrader from 3.x previously didn't remove the "nexus" element in nexus_purchases.ps_extra
|
||||
*
|
||||
* @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 step1()
|
||||
{
|
||||
$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 ) )
|
||||
{
|
||||
foreach ( $select as $row )
|
||||
{
|
||||
$extra = json_decode( $row['ps_extra'], TRUE );
|
||||
if ( isset( $extra['nexus'] ) )
|
||||
{
|
||||
$extra = $extra['nexus'];
|
||||
\IPS\Db::i()->update( 'nexus_purchases', array(
|
||||
'ps_extra' => json_encode( $extra ),
|
||||
), array( 'ps_id=?', $row['ps_id'] ) );
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
return $offset + 500;
|
||||
}
|
||||
else
|
||||
{
|
||||
unset( $_SESSION['_step1Count'] );
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Custom title for this step
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function step1CustomTitle()
|
||||
{
|
||||
$limit = isset( \IPS\Request::i()->extra ) ? \IPS\Request::i()->extra : 0;
|
||||
|
||||
if( !isset( $_SESSION['_step1Count'] ) )
|
||||
{
|
||||
$_SESSION['_step1Count'] = \IPS\Db::i()->select( 'COUNT(*)', 'nexus_purchases' )->first();
|
||||
}
|
||||
|
||||
return "Upgrading commmerce purchases (Upgraded so far: " . ( ( $limit > $_SESSION['_step1Count'] ) ? $_SESSION['_step1Count'] : $limit ) . ' out of ' . $_SESSION['_step1Count'] . ')';
|
||||
}
|
||||
}
|
||||
Whitespace-only changes.
@@ -1,102 +0,0 @@
|
||||
[
|
||||
{
|
||||
"method": "addIndex",
|
||||
"params": [
|
||||
"nexus_customer_addresses",
|
||||
{
|
||||
"type": "key",
|
||||
"name": "member",
|
||||
"columns": [
|
||||
"member"
|
||||
],
|
||||
"length": [
|
||||
null
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"method": "update",
|
||||
"params": [
|
||||
"nexus_support_replies",
|
||||
{
|
||||
"reply_hidden": 1
|
||||
},
|
||||
[
|
||||
"reply_hidden=? AND reply_type=?",
|
||||
0,
|
||||
"h"
|
||||
]
|
||||
]
|
||||
},
|
||||
{
|
||||
"method": "addColumn",
|
||||
"params": [
|
||||
"nexus_package_fields",
|
||||
{
|
||||
"name": "cf_invoice",
|
||||
"type": "TINYINT",
|
||||
"length": 1,
|
||||
"decimals": null,
|
||||
"values": null,
|
||||
"allow_null": false,
|
||||
"default": "1",
|
||||
"comment": "",
|
||||
"unsigned": false,
|
||||
"zerofill": false,
|
||||
"auto_increment": false,
|
||||
"binary": false
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"method": "createTable",
|
||||
"params": [
|
||||
{
|
||||
"name": "nexus_support_default_content",
|
||||
"columns": {
|
||||
"staff_id": {
|
||||
"name": "staff_id",
|
||||
"type": "MEDIUMINT",
|
||||
"length": 8,
|
||||
"decimals": null,
|
||||
"values": null,
|
||||
"allow_null": false,
|
||||
"default": null,
|
||||
"comment": "ID Number of staff member",
|
||||
"unsigned": true,
|
||||
"zerofill": false,
|
||||
"auto_increment": true,
|
||||
"binary": false
|
||||
},
|
||||
"content": {
|
||||
"name": "content",
|
||||
"type": "TEXT",
|
||||
"length": null,
|
||||
"decimals": null,
|
||||
"values": null,
|
||||
"allow_null": true,
|
||||
"default": null,
|
||||
"comment": "Default editor content",
|
||||
"unsigned": false,
|
||||
"zerofill": false,
|
||||
"auto_increment": false,
|
||||
"binary": false
|
||||
}
|
||||
},
|
||||
"indexes": {
|
||||
"PRIMARY": {
|
||||
"type": "primary",
|
||||
"name": "PRIMARY",
|
||||
"columns": [
|
||||
"staff_id"
|
||||
],
|
||||
"length": [
|
||||
null
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
Whitespace-only changes.
@@ -1,395 +0,0 @@
|
||||
{
|
||||
"1": {
|
||||
"method": "createTable",
|
||||
"params": [
|
||||
{
|
||||
"name": "nexus_support_streams",
|
||||
"columns": {
|
||||
"stream_id": {
|
||||
"name": "stream_id",
|
||||
"type": "BIGINT",
|
||||
"length": 20,
|
||||
"decimals": null,
|
||||
"values": null,
|
||||
"allow_null": false,
|
||||
"default": null,
|
||||
"comment": "ID Number",
|
||||
"unsigned": true,
|
||||
"zerofill": false,
|
||||
"auto_increment": true,
|
||||
"binary": false
|
||||
},
|
||||
"stream_departments": {
|
||||
"name": "stream_departments",
|
||||
"type": "TEXT",
|
||||
"length": null,
|
||||
"decimals": null,
|
||||
"values": null,
|
||||
"allow_null": true,
|
||||
"default": null,
|
||||
"comment": "Comma-delimited list of department IDs or NULL for all",
|
||||
"unsigned": false,
|
||||
"zerofill": false,
|
||||
"auto_increment": false,
|
||||
"binary": false
|
||||
},
|
||||
"stream_statuses": {
|
||||
"name": "stream_statuses",
|
||||
"type": "TEXT",
|
||||
"length": null,
|
||||
"decimals": null,
|
||||
"values": null,
|
||||
"allow_null": true,
|
||||
"default": null,
|
||||
"comment": "Comma-delimited list of status IDs or NULL for all",
|
||||
"unsigned": false,
|
||||
"zerofill": false,
|
||||
"auto_increment": false,
|
||||
"binary": false
|
||||
},
|
||||
"stream_severities": {
|
||||
"name": "stream_severities",
|
||||
"type": "TEXT",
|
||||
"length": null,
|
||||
"decimals": null,
|
||||
"values": null,
|
||||
"allow_null": true,
|
||||
"default": null,
|
||||
"comment": "Comma-delimited list of severity IDs or NULL for all",
|
||||
"unsigned": false,
|
||||
"zerofill": false,
|
||||
"auto_increment": false,
|
||||
"binary": false
|
||||
},
|
||||
"stream_staff": {
|
||||
"name": "stream_staff",
|
||||
"type": "TEXT",
|
||||
"length": null,
|
||||
"decimals": null,
|
||||
"values": null,
|
||||
"allow_null": true,
|
||||
"default": null,
|
||||
"comment": "Comma-delimited list of staff IDs or NULL for all",
|
||||
"unsigned": false,
|
||||
"zerofill": false,
|
||||
"auto_increment": false,
|
||||
"binary": false
|
||||
},
|
||||
"stream_from_email": {
|
||||
"name": "stream_from_email",
|
||||
"type": "VARCHAR",
|
||||
"length": 255,
|
||||
"decimals": null,
|
||||
"values": null,
|
||||
"allow_null": true,
|
||||
"default": null,
|
||||
"comment": "From email address, or NULL for any",
|
||||
"unsigned": false,
|
||||
"zerofill": false,
|
||||
"auto_increment": false,
|
||||
"binary": false
|
||||
},
|
||||
"stream_search_term": {
|
||||
"name": "stream_search_term",
|
||||
"type": "VARCHAR",
|
||||
"length": 255,
|
||||
"decimals": null,
|
||||
"values": null,
|
||||
"allow_null": true,
|
||||
"default": null,
|
||||
"comment": "Search term, or NULL for none",
|
||||
"unsigned": false,
|
||||
"zerofill": false,
|
||||
"auto_increment": false,
|
||||
"binary": false
|
||||
},
|
||||
"stream_started": {
|
||||
"name": "stream_started",
|
||||
"type": "INT",
|
||||
"length": 10,
|
||||
"decimals": null,
|
||||
"values": null,
|
||||
"allow_null": true,
|
||||
"default": null,
|
||||
"comment": "Number of hours to restrict started time to, or NULL for no restriction",
|
||||
"unsigned": true,
|
||||
"zerofill": false,
|
||||
"auto_increment": false,
|
||||
"binary": false
|
||||
},
|
||||
"stream_last_reply": {
|
||||
"name": "stream_last_reply",
|
||||
"type": "INT",
|
||||
"length": 10,
|
||||
"decimals": null,
|
||||
"values": null,
|
||||
"allow_null": true,
|
||||
"default": null,
|
||||
"comment": "Number of hours to restrict last reply time to, or NULL for no restriction",
|
||||
"unsigned": true,
|
||||
"zerofill": false,
|
||||
"auto_increment": false,
|
||||
"binary": false
|
||||
},
|
||||
"stream_last_staff_reply": {
|
||||
"name": "stream_last_staff_reply",
|
||||
"type": "INT",
|
||||
"length": 10,
|
||||
"decimals": null,
|
||||
"values": null,
|
||||
"allow_null": true,
|
||||
"default": null,
|
||||
"comment": "Number of hours to restrict last staff reply time to, or NULL for no restriction",
|
||||
"unsigned": true,
|
||||
"zerofill": false,
|
||||
"auto_increment": false,
|
||||
"binary": false
|
||||
},
|
||||
"stream_owner": {
|
||||
"name": "stream_owner",
|
||||
"type": "MEDIUMINT",
|
||||
"length": 8,
|
||||
"decimals": null,
|
||||
"values": null,
|
||||
"allow_null": true,
|
||||
"default": "",
|
||||
"comment": "The ID number of the staff member who owns the stream",
|
||||
"unsigned": true,
|
||||
"zerofill": false,
|
||||
"auto_increment": false,
|
||||
"binary": false
|
||||
},
|
||||
"stream_position": {
|
||||
"name": "stream_position",
|
||||
"type": "INT",
|
||||
"length": 10,
|
||||
"decimals": null,
|
||||
"values": null,
|
||||
"allow_null": true,
|
||||
"default": "",
|
||||
"comment": "Order in staff members streams",
|
||||
"unsigned": false,
|
||||
"zerofill": false,
|
||||
"auto_increment": false,
|
||||
"binary": false
|
||||
},
|
||||
"stream_last_new_reply": {
|
||||
"name": "stream_last_new_reply",
|
||||
"type": "INT",
|
||||
"length": 10,
|
||||
"decimals": null,
|
||||
"values": [],
|
||||
"allow_null": true,
|
||||
"default": null,
|
||||
"comment": "Number of hours to restrict reopened time to, or NULL for no restriction",
|
||||
"unsigned": true,
|
||||
"zerofill": false,
|
||||
"auto_increment": false,
|
||||
"binary": false
|
||||
},
|
||||
"stream_tracked": {
|
||||
"name": "stream_tracked",
|
||||
"type": "TINYINT",
|
||||
"length": 1,
|
||||
"decimals": null,
|
||||
"values": null,
|
||||
"allow_null": false,
|
||||
"default": "0",
|
||||
"comment": "Boolean value indicating if only tracked requests should be included",
|
||||
"unsigned": true,
|
||||
"zerofill": false,
|
||||
"auto_increment": false,
|
||||
"binary": false
|
||||
},
|
||||
"stream_title": {
|
||||
"name": "stream_title",
|
||||
"type": "VARCHAR",
|
||||
"length": 255,
|
||||
"decimals": null,
|
||||
"values": null,
|
||||
"allow_null": false,
|
||||
"default": null,
|
||||
"comment": "The name of the stream",
|
||||
"unsigned": false,
|
||||
"zerofill": false,
|
||||
"auto_increment": false,
|
||||
"binary": false
|
||||
},
|
||||
"stream_temporary": {
|
||||
"name": "stream_temporary",
|
||||
"type": "TINYINT",
|
||||
"length": 1,
|
||||
"decimals": null,
|
||||
"values": null,
|
||||
"allow_null": false,
|
||||
"default": "1",
|
||||
"comment": "If this has not yet been saved by its owner",
|
||||
"unsigned": true,
|
||||
"zerofill": false,
|
||||
"auto_increment": false,
|
||||
"binary": false
|
||||
}
|
||||
},
|
||||
"indexes": {
|
||||
"PRIMARY": {
|
||||
"type": "primary",
|
||||
"name": "PRIMARY",
|
||||
"columns": [
|
||||
"stream_id"
|
||||
],
|
||||
"length": [
|
||||
null
|
||||
]
|
||||
},
|
||||
"list": {
|
||||
"type": "key",
|
||||
"name": "list",
|
||||
"columns": [
|
||||
"stream_owner",
|
||||
"stream_position"
|
||||
],
|
||||
"length": [
|
||||
null,
|
||||
null
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"2": {
|
||||
"method": "dropColumn",
|
||||
"params": [
|
||||
"nexus_support_severities",
|
||||
"sev_icon"
|
||||
]
|
||||
},
|
||||
"3": {
|
||||
"method": "changeColumn",
|
||||
"params": [
|
||||
"nexus_licensekeys",
|
||||
"lkey_activate_data",
|
||||
{
|
||||
"name": "lkey_activate_data",
|
||||
"type": "MEDIUMTEXT",
|
||||
"length": 0,
|
||||
"decimals": null,
|
||||
"values": [],
|
||||
"allow_null": true,
|
||||
"default": null,
|
||||
"comment": "",
|
||||
"unsigned": false,
|
||||
"zerofill": false,
|
||||
"auto_increment": false,
|
||||
"binary": false
|
||||
}
|
||||
]
|
||||
},
|
||||
"4": {
|
||||
"method": "delete",
|
||||
"params": [
|
||||
"core_sys_lang_words",
|
||||
"word_app='nexus' AND word_key='previous_day'"
|
||||
]
|
||||
},
|
||||
"5": {
|
||||
"method": "delete",
|
||||
"params": [
|
||||
"core_sys_lang_words",
|
||||
"word_app='nexus' AND word_key='next_day'"
|
||||
]
|
||||
},
|
||||
"6": {
|
||||
"method": "renameTable",
|
||||
"params": [
|
||||
"nexus_support_default_content",
|
||||
"nexus_support_staff_preferences"
|
||||
]
|
||||
},
|
||||
"7": {
|
||||
"method": "addColumn",
|
||||
"params": [
|
||||
"nexus_support_staff_preferences",
|
||||
{
|
||||
"name": "action",
|
||||
"type": "VARCHAR",
|
||||
"length": 32,
|
||||
"decimals": null,
|
||||
"values": null,
|
||||
"allow_null": true,
|
||||
"default": null,
|
||||
"comment": "Default action when replying to a support request",
|
||||
"unsigned": false,
|
||||
"zerofill": false,
|
||||
"auto_increment": false,
|
||||
"binary": false
|
||||
}
|
||||
]
|
||||
},
|
||||
"8": {
|
||||
"method": "createTable",
|
||||
"params": [
|
||||
{
|
||||
"name": "nexus_support_staff_dpt_order",
|
||||
"columns": {
|
||||
"staff_id": {
|
||||
"name": "staff_id",
|
||||
"type": "MEDIUMINT",
|
||||
"length": 8,
|
||||
"decimals": null,
|
||||
"values": null,
|
||||
"allow_null": true,
|
||||
"default": "",
|
||||
"comment": "The staff's member ID",
|
||||
"unsigned": true,
|
||||
"zerofill": false,
|
||||
"auto_increment": false,
|
||||
"binary": false
|
||||
},
|
||||
"department_id": {
|
||||
"name": "department_id",
|
||||
"type": "INT",
|
||||
"length": 10,
|
||||
"decimals": null,
|
||||
"values": null,
|
||||
"allow_null": false,
|
||||
"default": null,
|
||||
"comment": "The department ID",
|
||||
"unsigned": true,
|
||||
"zerofill": false,
|
||||
"auto_increment": false,
|
||||
"binary": false
|
||||
},
|
||||
"dpt_position": {
|
||||
"name": "dpt_position",
|
||||
"type": "INT",
|
||||
"length": 10,
|
||||
"decimals": null,
|
||||
"values": null,
|
||||
"allow_null": true,
|
||||
"default": null,
|
||||
"comment": "The department position",
|
||||
"unsigned": true,
|
||||
"zerofill": false,
|
||||
"auto_increment": false,
|
||||
"binary": false
|
||||
}
|
||||
},
|
||||
"indexes": {
|
||||
"staff_and_department": {
|
||||
"type": "unique",
|
||||
"name": "staff_and_department",
|
||||
"columns": [
|
||||
"staff_id",
|
||||
"department_id"
|
||||
],
|
||||
"length": [
|
||||
null,
|
||||
null
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
Whitespace-only changes.
@@ -1,41 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* @brief 4.1.17 Beta 3 Upgrade Code
|
||||
* @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
|
||||
*/
|
||||
|
||||
namespace IPS\nexus\setup\upg_101075;
|
||||
|
||||
/* To prevent PHP errors (extending class does not exist) revealing path */
|
||||
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
{
|
||||
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
|
||||
exit;
|
||||
}
|
||||
|
||||
/**
|
||||
* 4.1.17 Beta 3 Upgrade Code
|
||||
*/
|
||||
class _Upgrade
|
||||
{
|
||||
/**
|
||||
* Remove orphaned data from deleted payment gateways
|
||||
*
|
||||
* @return array 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 step1()
|
||||
{
|
||||
\IPS\Db::i()->delete( 'nexus_customer_cards', \IPS\Db::i()->in( 'card_method', array_values( iterator_to_array( \IPS\Db::i()->select( 'm_id', 'nexus_paymethods' ) ) ), TRUE ) );
|
||||
\IPS\Db::i()->delete( 'nexus_billing_agreements', \IPS\Db::i()->in( 'ba_method', array_values( iterator_to_array( \IPS\Db::i()->select( 'm_id', 'nexus_paymethods' ) ) ), TRUE ) );
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
// You can create as many additional methods (step2, step3, etc.) as is necessary.
|
||||
// Each step will be executed in a new HTTP request
|
||||
}
|
||||
Whitespace-only changes.
@@ -1,60 +0,0 @@
|
||||
{
|
||||
"1": {
|
||||
"method": "changeColumn",
|
||||
"params": [
|
||||
"nexus_purchases",
|
||||
"ps_custom_fields",
|
||||
{
|
||||
"name": "ps_custom_fields",
|
||||
"type": "MEDIUMTEXT",
|
||||
"length": 0,
|
||||
"decimals": null,
|
||||
"values": [],
|
||||
"allow_null": true,
|
||||
"default": null,
|
||||
"comment": "",
|
||||
"unsigned": false,
|
||||
"zerofill": false,
|
||||
"auto_increment": false,
|
||||
"binary": false
|
||||
}
|
||||
]
|
||||
},
|
||||
"2": {
|
||||
"method": "changeColumn",
|
||||
"params": [
|
||||
"nexus_support_requests",
|
||||
"r_cfields",
|
||||
{
|
||||
"name": "r_cfields",
|
||||
"type": "MEDIUMTEXT",
|
||||
"length": 0,
|
||||
"decimals": null,
|
||||
"values": [],
|
||||
"allow_null": true,
|
||||
"default": null,
|
||||
"comment": "",
|
||||
"unsigned": false,
|
||||
"zerofill": false,
|
||||
"auto_increment": false,
|
||||
"binary": false
|
||||
}
|
||||
]
|
||||
},
|
||||
"3": {
|
||||
"method": "addIndex",
|
||||
"params": [
|
||||
"nexus_purchases",
|
||||
{
|
||||
"type": "key",
|
||||
"name": "ps_parent",
|
||||
"columns": [
|
||||
"ps_parent"
|
||||
],
|
||||
"length": [
|
||||
null
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -1,113 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* @brief 4.1.18.1 Upgrade Code
|
||||
* @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
|
||||
*/
|
||||
|
||||
namespace IPS\nexus\setup\upg_101088;
|
||||
|
||||
/* To prevent PHP errors (extending class does not exist) revealing path */
|
||||
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
{
|
||||
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
|
||||
exit;
|
||||
}
|
||||
|
||||
/**
|
||||
* 4.1.18.1 Upgrade Code
|
||||
*/
|
||||
class _Upgrade
|
||||
{
|
||||
/**
|
||||
* Convert custom customer field database schemas if needed
|
||||
*
|
||||
* @return array 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 step1()
|
||||
{
|
||||
$queries = array();
|
||||
|
||||
foreach( \IPS\Db::i()->select( '*', 'nexus_customer_fields', array( "f_type IN( 'Editor','Codemirror','TextArea','Upload','Address','Select' )" ) ) as $field )
|
||||
{
|
||||
\IPS\Db::i()->returnQuery = TRUE;
|
||||
|
||||
if( \IPS\Db::i()->checkForIndex( 'nexus_customers', 'field_' . $field['f_id'] ) )
|
||||
{
|
||||
$queries[] = array( 'table' => 'nexus_customers', 'query' => \IPS\Db::i()->dropIndex( 'nexus_customers', 'field_' . $field['f_id'] ) );
|
||||
}
|
||||
|
||||
\IPS\Db::i()->returnQuery = TRUE;
|
||||
$queries[] = array( 'table' => 'nexus_customers', 'query' => \IPS\Db::i()->changeColumn( 'nexus_customers', 'field_' . $field['f_id'], array( 'name' => 'field_' . $field['f_id'], 'type' => 'MEDIUMTEXT' ) ) );
|
||||
|
||||
\IPS\Db::i()->returnQuery = TRUE;
|
||||
$queries[] = array( 'table' => 'nexus_customers', 'query' => \IPS\Db::i()->addIndex( 'nexus_customers', array( 'type' => 'fulltext', 'name' => 'field_' . $field['f_id'], 'columns' => array( 'field_' . $field['f_id'] ) ) ) );
|
||||
|
||||
\IPS\Db::i()->returnQuery = FALSE;
|
||||
}
|
||||
|
||||
if( \count( $queries ) )
|
||||
{
|
||||
$toRun = \IPS\core\Setup\Upgrade::runManualQueries( $queries );
|
||||
|
||||
if ( \count( $toRun ) )
|
||||
{
|
||||
\IPS\core\Setup\Upgrade::adjustMultipleRedirect( array( 1 => 'nexus', 'extra' => array( '_upgradeStep' => 2 ) ) );
|
||||
|
||||
/* Queries to run manually */
|
||||
return array( 'html' => \IPS\Theme::i()->getTemplate( 'forms' )->queries( $toRun, \IPS\Http\Url::internal( 'controller=upgrade' )->setQueryString( array( 'key' => $_SESSION['uniqueKey'], 'mr_continue' => 1, 'mr' => \IPS\Request::i()->mr ) ) ) );
|
||||
}
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/**
|
||||
* Custom title for this step
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function step1CustomTitle()
|
||||
{
|
||||
return "Adjusting customer custom field definitions";
|
||||
}
|
||||
|
||||
/**
|
||||
* Fix a possible missing column; Clients upgrading from IPB3.1 could be missing this column
|
||||
*
|
||||
* @return array 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 step2()
|
||||
{
|
||||
if ( !\IPS\Db::i()->checkForColumn( 'core_members', 'cm_return_group' ) )
|
||||
{
|
||||
$toRun = \IPS\core\Setup\Upgrade::runManualQueries( array( array(
|
||||
'table' => 'core_members',
|
||||
'query' => "ALTER TABLE " . \IPS\Db::i()->prefix . "core_members ADD COLUMN cm_return_group SMALLINT(3) NOT NULL DEFAULT 0;"
|
||||
) ) );
|
||||
|
||||
if ( \count( $toRun ) )
|
||||
{
|
||||
\IPS\core\Setup\Upgrade::adjustMultipleRedirect( array( 1 => 'nexus', 'extra' => array( '_upgradeStep' => 3 ) ) );
|
||||
|
||||
/* Queries to run manually */
|
||||
return array( 'html' => \IPS\Theme::i()->getTemplate( 'forms' )->queries( $toRun, \IPS\Http\Url::internal( 'controller=upgrade' )->setQueryString( array( 'key' => $_SESSION['uniqueKey'], 'mr_continue' => 1, 'mr' => \IPS\Request::i()->mr ) ) ) );
|
||||
}
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/**
|
||||
* Custom title for this step
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function step2CustomTitle()
|
||||
{
|
||||
return "Fixing members table structure";
|
||||
}
|
||||
}
|
||||
Whitespace-only changes.
@@ -1,380 +0,0 @@
|
||||
{
|
||||
"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,39 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* @brief 4.2.0 Beta 1 Upgrade Code
|
||||
* @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 03 Aug 2017
|
||||
*/
|
||||
|
||||
namespace IPS\nexus\setup\upg_101100;
|
||||
|
||||
/* To prevent PHP errors (extending class does not exist) revealing path */
|
||||
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
{
|
||||
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
|
||||
exit;
|
||||
}
|
||||
|
||||
/**
|
||||
* 4.2.0 Beta 1 Upgrade Code
|
||||
*/
|
||||
class _Upgrade
|
||||
{
|
||||
/**
|
||||
* Finish - This is run after all apps have been upgraded
|
||||
*
|
||||
* @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)
|
||||
* @note We opted not to let users run this immediately during the upgrade because of potential issues (it taking a long time and users stopping it or getting frustrated) but we can revisit later
|
||||
*/
|
||||
public function finish()
|
||||
{
|
||||
/* Move customer history to member history */
|
||||
\IPS\Task::queue( 'nexus', 'MoveCustomerHistory', array(), 3 );
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
Whitespace-only changes.
@@ -1,40 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* @brief 4.2.3 Upgrade Code
|
||||
* @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 31 Jul 2017
|
||||
*/
|
||||
|
||||
namespace IPS\nexus\setup\upg_102010;
|
||||
|
||||
/* To prevent PHP errors (extending class does not exist) revealing path */
|
||||
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
{
|
||||
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
|
||||
exit;
|
||||
}
|
||||
|
||||
/**
|
||||
* 4.2.3 Upgrade Code
|
||||
*/
|
||||
class _Upgrade
|
||||
{
|
||||
/**
|
||||
* Repair Custom Field URLs
|
||||
*
|
||||
* @return array 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 finish()
|
||||
{
|
||||
$support = new \IPS\nexus\extensions\core\FileStorage\Support;
|
||||
\IPS\Task::queue( 'core', 'RepairFileUrls', array( 'storageExtension' => 'filestorage__nexus_Support', 'count' => $support->count() ), 1 );
|
||||
|
||||
$customer = new \IPS\nexus\extensions\core\FileStorage\Customer;
|
||||
\IPS\Task::queue( 'core', 'RepairFileUrls', array( 'storageExtension' => 'filestorage__nexus_Customer', 'count' => $customer->count() ), 1 );
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
Whitespace-only changes.
@@ -1,856 +0,0 @@
|
||||
{
|
||||
"1": {
|
||||
"method": "addColumn",
|
||||
"params": [
|
||||
"nexus_packages",
|
||||
{
|
||||
"name": "p_email_purchase",
|
||||
"type": "MEDIUMTEXT",
|
||||
"length": null,
|
||||
"decimals": null,
|
||||
"values": null,
|
||||
"allow_null": true,
|
||||
"default": null,
|
||||
"comment": "Email to send on new purchase",
|
||||
"unsigned": false,
|
||||
"zerofill": false,
|
||||
"auto_increment": false,
|
||||
"binary": false
|
||||
}
|
||||
]
|
||||
},
|
||||
"2": {
|
||||
"method": "addColumn",
|
||||
"params": [
|
||||
"nexus_packages",
|
||||
{
|
||||
"name": "p_email_expire_soon",
|
||||
"type": "MEDIUMTEXT",
|
||||
"length": null,
|
||||
"decimals": null,
|
||||
"values": null,
|
||||
"allow_null": true,
|
||||
"default": null,
|
||||
"comment": "Email to send when purchase will expire soon",
|
||||
"unsigned": false,
|
||||
"zerofill": false,
|
||||
"auto_increment": false,
|
||||
"binary": false
|
||||
}
|
||||
]
|
||||
},
|
||||
"3": {
|
||||
"method": "addColumn",
|
||||
"params": [
|
||||
"nexus_packages",
|
||||
{
|
||||
"name": "p_email_expire",
|
||||
"type": "MEDIUMTEXT",
|
||||
"length": null,
|
||||
"decimals": null,
|
||||
"values": null,
|
||||
"allow_null": true,
|
||||
"default": null,
|
||||
"comment": "Email to send when purchase expires",
|
||||
"unsigned": false,
|
||||
"zerofill": false,
|
||||
"auto_increment": false,
|
||||
"binary": false
|
||||
}
|
||||
]
|
||||
},
|
||||
"4": {
|
||||
"method": "addColumn",
|
||||
"params": [
|
||||
"nexus_packages",
|
||||
{
|
||||
"name": "p_email_purchase_type",
|
||||
"type": "VARCHAR",
|
||||
"length": 16,
|
||||
"decimals": null,
|
||||
"values": null,
|
||||
"allow_null": true,
|
||||
"default": null,
|
||||
"comment": "",
|
||||
"unsigned": false,
|
||||
"zerofill": false,
|
||||
"auto_increment": false,
|
||||
"binary": false
|
||||
}
|
||||
]
|
||||
},
|
||||
"5": {
|
||||
"method": "addColumn",
|
||||
"params": [
|
||||
"nexus_packages",
|
||||
{
|
||||
"name": "p_email_expire_soon_type",
|
||||
"type": "VARCHAR",
|
||||
"length": 16,
|
||||
"decimals": null,
|
||||
"values": null,
|
||||
"allow_null": true,
|
||||
"default": null,
|
||||
"comment": "",
|
||||
"unsigned": false,
|
||||
"zerofill": false,
|
||||
"auto_increment": false,
|
||||
"binary": false
|
||||
}
|
||||
]
|
||||
},
|
||||
"6": {
|
||||
"method": "addColumn",
|
||||
"params": [
|
||||
"nexus_packages",
|
||||
{
|
||||
"name": "p_email_expire_type",
|
||||
"type": "VARCHAR",
|
||||
"length": 16,
|
||||
"decimals": null,
|
||||
"values": null,
|
||||
"allow_null": true,
|
||||
"default": null,
|
||||
"comment": "",
|
||||
"unsigned": false,
|
||||
"zerofill": false,
|
||||
"auto_increment": false,
|
||||
"binary": false
|
||||
}
|
||||
]
|
||||
},
|
||||
"7": {
|
||||
"method": "delete",
|
||||
"params": [
|
||||
"core_sys_conf_settings",
|
||||
[
|
||||
"conf_key=?",
|
||||
"nexus_https"
|
||||
]
|
||||
]
|
||||
},
|
||||
"8": {
|
||||
"method": "delete",
|
||||
"params": [
|
||||
"core_sys_lang_words",
|
||||
[
|
||||
"word_app=? AND ( word_key IN ( 'nexus_https', 'nexus_https_desc', 'nexus_https_err' ) )",
|
||||
"nexus"
|
||||
]
|
||||
]
|
||||
},
|
||||
"9": {
|
||||
"method": "addColumn",
|
||||
"params": [
|
||||
"nexus_packages",
|
||||
{
|
||||
"name": "p_date_updated",
|
||||
"type": "INT",
|
||||
"length": 10,
|
||||
"decimals": null,
|
||||
"values": null,
|
||||
"allow_null": true,
|
||||
"default": "",
|
||||
"comment": "",
|
||||
"unsigned": true,
|
||||
"zerofill": false,
|
||||
"auto_increment": false,
|
||||
"binary": false
|
||||
}
|
||||
]
|
||||
},
|
||||
"10": {
|
||||
"method": "update",
|
||||
"params": [
|
||||
"nexus_packages",
|
||||
"p_date_updated=p_date_added"
|
||||
]
|
||||
},
|
||||
"11": {
|
||||
"method": "addColumn",
|
||||
"params": [
|
||||
"nexus_reviews",
|
||||
{
|
||||
"name": "review_author_response",
|
||||
"type": "MEDIUMTEXT",
|
||||
"length": null,
|
||||
"decimals": null,
|
||||
"values": null,
|
||||
"allow_null": true,
|
||||
"default": null,
|
||||
"comment": "",
|
||||
"unsigned": false,
|
||||
"zerofill": false,
|
||||
"auto_increment": false,
|
||||
"binary": false
|
||||
}
|
||||
]
|
||||
},
|
||||
"12": {
|
||||
"method": "addColumn",
|
||||
"params": [
|
||||
"nexus_purchases",
|
||||
{
|
||||
"name": "ps_fee",
|
||||
"type": "DECIMAL",
|
||||
"length": 20,
|
||||
"decimals": 2,
|
||||
"values": null,
|
||||
"allow_null": true,
|
||||
"default": null,
|
||||
"comment": "",
|
||||
"unsigned": true,
|
||||
"zerofill": false,
|
||||
"auto_increment": false,
|
||||
"binary": false
|
||||
}
|
||||
]
|
||||
},
|
||||
"13": {
|
||||
"method": "delete",
|
||||
"params": [
|
||||
"core_sys_lang_words",
|
||||
[
|
||||
"word_app=? AND word_key=?",
|
||||
"nexus",
|
||||
"support"
|
||||
]
|
||||
]
|
||||
},
|
||||
"14": {
|
||||
"method": "createTable",
|
||||
"params": [
|
||||
{
|
||||
"name": "nexus_member_subscription_packages",
|
||||
"columns": {
|
||||
"sp_id": {
|
||||
"allow_null": false,
|
||||
"auto_increment": true,
|
||||
"binary": false,
|
||||
"comment": "",
|
||||
"decimals": null,
|
||||
"default": null,
|
||||
"length": 10,
|
||||
"name": "sp_id",
|
||||
"type": "INT",
|
||||
"unsigned": false,
|
||||
"values": [],
|
||||
"zerofill": false
|
||||
},
|
||||
"sp_enabled": {
|
||||
"allow_null": false,
|
||||
"auto_increment": false,
|
||||
"binary": false,
|
||||
"comment": "",
|
||||
"decimals": null,
|
||||
"default": "1",
|
||||
"length": 1,
|
||||
"name": "sp_enabled",
|
||||
"type": "TINYINT",
|
||||
"unsigned": false,
|
||||
"values": [],
|
||||
"zerofill": false
|
||||
},
|
||||
"sp_tax": {
|
||||
"allow_null": false,
|
||||
"auto_increment": false,
|
||||
"binary": false,
|
||||
"comment": "",
|
||||
"decimals": null,
|
||||
"default": "0",
|
||||
"length": 5,
|
||||
"name": "sp_tax",
|
||||
"type": "INT",
|
||||
"unsigned": false,
|
||||
"values": [],
|
||||
"zerofill": false
|
||||
},
|
||||
"sp_gateways": {
|
||||
"allow_null": true,
|
||||
"auto_increment": false,
|
||||
"binary": false,
|
||||
"comment": "",
|
||||
"decimals": null,
|
||||
"default": null,
|
||||
"length": 0,
|
||||
"name": "sp_gateways",
|
||||
"type": "TEXT",
|
||||
"unsigned": false,
|
||||
"values": [],
|
||||
"zerofill": false
|
||||
},
|
||||
"sp_price": {
|
||||
"allow_null": true,
|
||||
"auto_increment": false,
|
||||
"binary": false,
|
||||
"comment": "",
|
||||
"decimals": null,
|
||||
"default": null,
|
||||
"length": 0,
|
||||
"name": "sp_price",
|
||||
"type": "TEXT",
|
||||
"unsigned": false,
|
||||
"values": [],
|
||||
"zerofill": false
|
||||
},
|
||||
"sp_primary_group": {
|
||||
"allow_null": false,
|
||||
"auto_increment": false,
|
||||
"binary": false,
|
||||
"comment": "",
|
||||
"decimals": null,
|
||||
"default": "0",
|
||||
"length": 10,
|
||||
"name": "sp_primary_group",
|
||||
"type": "INT",
|
||||
"unsigned": false,
|
||||
"values": [],
|
||||
"zerofill": false
|
||||
},
|
||||
"sp_secondary_group": {
|
||||
"allow_null": true,
|
||||
"auto_increment": false,
|
||||
"binary": false,
|
||||
"comment": "",
|
||||
"decimals": null,
|
||||
"default": null,
|
||||
"length": 0,
|
||||
"name": "sp_secondary_group",
|
||||
"type": "TEXT",
|
||||
"unsigned": false,
|
||||
"values": [],
|
||||
"zerofill": false
|
||||
},
|
||||
"sp_position": {
|
||||
"allow_null": false,
|
||||
"auto_increment": false,
|
||||
"binary": false,
|
||||
"comment": "",
|
||||
"decimals": null,
|
||||
"default": "0",
|
||||
"length": 10,
|
||||
"name": "sp_position",
|
||||
"type": "INT",
|
||||
"unsigned": false,
|
||||
"values": [],
|
||||
"zerofill": false
|
||||
},
|
||||
"sp_renew_options": {
|
||||
"allow_null": true,
|
||||
"auto_increment": false,
|
||||
"binary": false,
|
||||
"comment": "",
|
||||
"decimals": null,
|
||||
"default": null,
|
||||
"length": 0,
|
||||
"name": "sp_renew_options",
|
||||
"type": "TEXT",
|
||||
"unsigned": false,
|
||||
"values": [],
|
||||
"zerofill": false
|
||||
},
|
||||
"sp_reg_show": {
|
||||
"allow_null": true,
|
||||
"auto_increment": false,
|
||||
"binary": false,
|
||||
"comment": "",
|
||||
"decimals": null,
|
||||
"default": "0",
|
||||
"length": 1,
|
||||
"name": "sp_reg_show",
|
||||
"type": "INT",
|
||||
"unsigned": false,
|
||||
"values": [],
|
||||
"zerofill": false
|
||||
},
|
||||
"sp_featured": {
|
||||
"allow_null": true,
|
||||
"auto_increment": false,
|
||||
"binary": false,
|
||||
"comment": "",
|
||||
"decimals": null,
|
||||
"default": "0",
|
||||
"length": 1,
|
||||
"name": "sp_featured",
|
||||
"type": "INT",
|
||||
"unsigned": false,
|
||||
"values": [],
|
||||
"zerofill": false
|
||||
},
|
||||
"sp_count_active": {
|
||||
"allow_null": false,
|
||||
"auto_increment": false,
|
||||
"binary": false,
|
||||
"comment": "",
|
||||
"decimals": null,
|
||||
"default": "0",
|
||||
"length": 10,
|
||||
"name": "sp_count_active",
|
||||
"type": "INT",
|
||||
"unsigned": false,
|
||||
"values": [],
|
||||
"zerofill": false
|
||||
},
|
||||
"sp_count_inactive": {
|
||||
"allow_null": false,
|
||||
"auto_increment": false,
|
||||
"binary": false,
|
||||
"comment": "",
|
||||
"decimals": null,
|
||||
"default": "0",
|
||||
"length": 10,
|
||||
"name": "sp_count_inactive",
|
||||
"type": "INT",
|
||||
"unsigned": false,
|
||||
"values": [],
|
||||
"zerofill": false
|
||||
},
|
||||
"sp_return_primary": {
|
||||
"name": "sp_return_primary",
|
||||
"type": "TINYINT",
|
||||
"length": 1,
|
||||
"decimals": null,
|
||||
"values": null,
|
||||
"allow_null": false,
|
||||
"default": "0",
|
||||
"comment": "",
|
||||
"unsigned": true,
|
||||
"zerofill": false,
|
||||
"auto_increment": false,
|
||||
"binary": false
|
||||
},
|
||||
"sp_image": {
|
||||
"name": "sp_image",
|
||||
"type": "TEXT",
|
||||
"length": null,
|
||||
"decimals": null,
|
||||
"values": null,
|
||||
"allow_null": true,
|
||||
"default": null,
|
||||
"comment": "",
|
||||
"unsigned": false,
|
||||
"zerofill": false,
|
||||
"auto_increment": false,
|
||||
"binary": false
|
||||
}
|
||||
},
|
||||
"indexes": {
|
||||
"PRIMARY": {
|
||||
"type": "primary",
|
||||
"name": "PRIMARY",
|
||||
"length": [
|
||||
null
|
||||
],
|
||||
"columns": [
|
||||
"sp_id"
|
||||
]
|
||||
},
|
||||
"sp_enabled": {
|
||||
"type": "key",
|
||||
"name": "sp_enabled",
|
||||
"length": [
|
||||
null
|
||||
],
|
||||
"columns": [
|
||||
"sp_enabled"
|
||||
]
|
||||
}
|
||||
},
|
||||
"collation": "utf8_general_ci",
|
||||
"engine": "InnoDB"
|
||||
}
|
||||
]
|
||||
},
|
||||
"15": {
|
||||
"method": "createTable",
|
||||
"params": [
|
||||
{
|
||||
"name": "nexus_member_subscriptions",
|
||||
"columns": {
|
||||
"sub_id": {
|
||||
"allow_null": false,
|
||||
"auto_increment": true,
|
||||
"binary": false,
|
||||
"comment": "",
|
||||
"decimals": null,
|
||||
"default": null,
|
||||
"length": 10,
|
||||
"name": "sub_id",
|
||||
"type": "INT",
|
||||
"unsigned": false,
|
||||
"values": [],
|
||||
"zerofill": false
|
||||
},
|
||||
"sub_member_id": {
|
||||
"allow_null": false,
|
||||
"auto_increment": false,
|
||||
"binary": false,
|
||||
"comment": "",
|
||||
"decimals": null,
|
||||
"default": "0",
|
||||
"length": 20,
|
||||
"name": "sub_member_id",
|
||||
"type": "BIGINT",
|
||||
"unsigned": false,
|
||||
"values": [],
|
||||
"zerofill": false
|
||||
},
|
||||
"sub_active": {
|
||||
"allow_null": false,
|
||||
"auto_increment": false,
|
||||
"binary": false,
|
||||
"comment": "",
|
||||
"decimals": null,
|
||||
"default": "0",
|
||||
"length": 1,
|
||||
"name": "sub_active",
|
||||
"type": "TINYINT",
|
||||
"unsigned": false,
|
||||
"values": [],
|
||||
"zerofill": false
|
||||
},
|
||||
"sub_cancelled": {
|
||||
"allow_null": false,
|
||||
"auto_increment": false,
|
||||
"binary": false,
|
||||
"comment": "",
|
||||
"decimals": null,
|
||||
"default": "0",
|
||||
"length": 1,
|
||||
"name": "sub_cancelled",
|
||||
"type": "TINYINT",
|
||||
"unsigned": false,
|
||||
"values": [],
|
||||
"zerofill": false
|
||||
},
|
||||
"sub_start": {
|
||||
"allow_null": false,
|
||||
"auto_increment": false,
|
||||
"binary": false,
|
||||
"comment": "",
|
||||
"decimals": null,
|
||||
"default": "0",
|
||||
"length": 10,
|
||||
"name": "sub_start",
|
||||
"type": "INT",
|
||||
"unsigned": false,
|
||||
"values": [],
|
||||
"zerofill": false
|
||||
},
|
||||
"sub_expire": {
|
||||
"allow_null": false,
|
||||
"auto_increment": false,
|
||||
"binary": false,
|
||||
"comment": "",
|
||||
"decimals": null,
|
||||
"default": "0",
|
||||
"length": 10,
|
||||
"name": "sub_expire",
|
||||
"type": "INT",
|
||||
"unsigned": false,
|
||||
"values": [],
|
||||
"zerofill": false
|
||||
},
|
||||
"sub_package_id": {
|
||||
"name": "sub_package_id",
|
||||
"type": "INT",
|
||||
"length": 10,
|
||||
"decimals": null,
|
||||
"values": null,
|
||||
"allow_null": false,
|
||||
"default": "0",
|
||||
"comment": "",
|
||||
"unsigned": true,
|
||||
"zerofill": false,
|
||||
"auto_increment": false,
|
||||
"binary": false
|
||||
},
|
||||
"sub_previous_group": {
|
||||
"name": "sub_previous_group",
|
||||
"type": "INT",
|
||||
"length": 10,
|
||||
"decimals": null,
|
||||
"values": null,
|
||||
"allow_null": false,
|
||||
"default": "0",
|
||||
"comment": "",
|
||||
"unsigned": true,
|
||||
"zerofill": false,
|
||||
"auto_increment": false,
|
||||
"binary": false
|
||||
},
|
||||
"sub_previous_secondary_groups": {
|
||||
"name": "sub_previous_secondary_groups",
|
||||
"type": "TEXT",
|
||||
"length": null,
|
||||
"decimals": null,
|
||||
"values": null,
|
||||
"allow_null": true,
|
||||
"default": null,
|
||||
"comment": "",
|
||||
"unsigned": false,
|
||||
"zerofill": false,
|
||||
"auto_increment": false,
|
||||
"binary": false
|
||||
},
|
||||
"sub_renews": {
|
||||
"name": "sub_renews",
|
||||
"type": "TINYINT",
|
||||
"length": 1,
|
||||
"decimals": null,
|
||||
"values": null,
|
||||
"allow_null": false,
|
||||
"default": "0",
|
||||
"comment": "",
|
||||
"unsigned": true,
|
||||
"zerofill": false,
|
||||
"auto_increment": false,
|
||||
"binary": false
|
||||
},
|
||||
"sub_invoice_id": {
|
||||
"name": "sub_invoice_id",
|
||||
"type": "BIGINT",
|
||||
"length": 20,
|
||||
"decimals": null,
|
||||
"values": null,
|
||||
"allow_null": false,
|
||||
"default": "0",
|
||||
"comment": "",
|
||||
"unsigned": true,
|
||||
"zerofill": false,
|
||||
"auto_increment": false,
|
||||
"binary": false
|
||||
},
|
||||
"sub_purchase_id": {
|
||||
"name": "sub_purchase_id",
|
||||
"type": "BIGINT",
|
||||
"length": 20,
|
||||
"decimals": null,
|
||||
"values": null,
|
||||
"allow_null": false,
|
||||
"default": "0",
|
||||
"comment": "",
|
||||
"unsigned": true,
|
||||
"zerofill": false,
|
||||
"auto_increment": false,
|
||||
"binary": false
|
||||
},
|
||||
"sub_added_manually": {
|
||||
"name": "sub_added_manually",
|
||||
"type": "TINYINT",
|
||||
"length": 1,
|
||||
"decimals": null,
|
||||
"values": null,
|
||||
"allow_null": false,
|
||||
"default": "0",
|
||||
"comment": "",
|
||||
"unsigned": true,
|
||||
"zerofill": false,
|
||||
"auto_increment": false,
|
||||
"binary": false
|
||||
}
|
||||
},
|
||||
"indexes": {
|
||||
"PRIMARY": {
|
||||
"type": "primary",
|
||||
"name": "PRIMARY",
|
||||
"length": [
|
||||
null
|
||||
],
|
||||
"columns": [
|
||||
"sub_id"
|
||||
]
|
||||
},
|
||||
"sub_active": {
|
||||
"type": "key",
|
||||
"name": "sub_active",
|
||||
"length": [
|
||||
null
|
||||
],
|
||||
"columns": [
|
||||
"sub_active"
|
||||
]
|
||||
},
|
||||
"sub_cancelled": {
|
||||
"type": "key",
|
||||
"name": "sub_cancelled",
|
||||
"length": [
|
||||
null
|
||||
],
|
||||
"columns": [
|
||||
"sub_cancelled"
|
||||
]
|
||||
},
|
||||
"sub_expire": {
|
||||
"type": "key",
|
||||
"name": "sub_expire",
|
||||
"length": [
|
||||
null
|
||||
],
|
||||
"columns": [
|
||||
"sub_expire"
|
||||
]
|
||||
},
|
||||
"member_sub_id": {
|
||||
"type": "key",
|
||||
"name": "member_sub_id",
|
||||
"columns": [
|
||||
"sub_member_id",
|
||||
"sub_package_id"
|
||||
],
|
||||
"length": [
|
||||
null,
|
||||
null
|
||||
]
|
||||
}
|
||||
},
|
||||
"collation": "utf8_general_ci",
|
||||
"engine": "InnoDB"
|
||||
}
|
||||
]
|
||||
},
|
||||
"16": {
|
||||
"method": "changeColumn",
|
||||
"params": [
|
||||
"nexus_support_requests",
|
||||
"r_status",
|
||||
{
|
||||
"name": "r_status",
|
||||
"type": "INT",
|
||||
"length": 5,
|
||||
"decimals": null,
|
||||
"values": [],
|
||||
"allow_null": false,
|
||||
"default": "0",
|
||||
"comment": "",
|
||||
"unsigned": false,
|
||||
"zerofill": false,
|
||||
"auto_increment": false,
|
||||
"binary": false
|
||||
}
|
||||
]
|
||||
},
|
||||
"17": {
|
||||
"method": "addIndex",
|
||||
"params": [
|
||||
"nexus_packages",
|
||||
{
|
||||
"type": "key",
|
||||
"name": "p_group",
|
||||
"columns": [
|
||||
"p_group"
|
||||
],
|
||||
"length": [
|
||||
null
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"18": {
|
||||
"method": "addIndex",
|
||||
"params": [
|
||||
"nexus_support_requests",
|
||||
{
|
||||
"type": "key",
|
||||
"name": "status_and_department",
|
||||
"columns": [
|
||||
"r_status",
|
||||
"r_department"
|
||||
],
|
||||
"length": [
|
||||
null,
|
||||
null
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"19": {
|
||||
"method": "addIndex",
|
||||
"params": [
|
||||
"nexus_alternate_contacts",
|
||||
{
|
||||
"type": "key",
|
||||
"name": "alt_id",
|
||||
"columns": [
|
||||
"alt_id"
|
||||
],
|
||||
"length": [
|
||||
null
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"20": {
|
||||
"method": "changeIndex",
|
||||
"params": [
|
||||
"nexus_support_replies",
|
||||
"reply_request",
|
||||
{
|
||||
"type": "key",
|
||||
"name": "reply_request",
|
||||
"columns": [
|
||||
"reply_request",
|
||||
"reply_hidden",
|
||||
"reply_date"
|
||||
],
|
||||
"length": [
|
||||
null,
|
||||
null,
|
||||
null
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"21": {
|
||||
"method": "addIndex",
|
||||
"params": [
|
||||
"nexus_support_tracker",
|
||||
{
|
||||
"type": "key",
|
||||
"name": "notifications",
|
||||
"columns": [
|
||||
"request_id",
|
||||
"notify"
|
||||
],
|
||||
"length": [
|
||||
null,
|
||||
null
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"22": {
|
||||
"method": "addIndex",
|
||||
"params": [
|
||||
"nexus_support_statuses",
|
||||
{
|
||||
"type": "key",
|
||||
"name": "member_default",
|
||||
"columns": [
|
||||
"status_default_member"
|
||||
],
|
||||
"length": [
|
||||
null
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"23": {
|
||||
"method": "addIndex",
|
||||
"params": [
|
||||
"nexus_payouts",
|
||||
{
|
||||
"type": "key",
|
||||
"name": "po_member",
|
||||
"columns": [
|
||||
"po_member",
|
||||
"po_date"
|
||||
],
|
||||
"length": [
|
||||
null,
|
||||
null
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -1,106 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* @brief 4.3.0 Beta 1 Upgrade Code
|
||||
* @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 28 Dec 2017
|
||||
*/
|
||||
|
||||
namespace IPS\nexus\setup\upg_103000;
|
||||
|
||||
/* To prevent PHP errors (extending class does not exist) revealing path */
|
||||
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
{
|
||||
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
|
||||
exit;
|
||||
}
|
||||
|
||||
/**
|
||||
* 4.3.0 Beta 1 Upgrade Code
|
||||
*/
|
||||
class _Upgrade
|
||||
{
|
||||
/**
|
||||
* Step 1
|
||||
* Index products
|
||||
*
|
||||
* @return array 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 step1()
|
||||
{
|
||||
\IPS\Task::queue( 'core', 'RebuildSearchIndex', array( 'class' => 'IPS\nexus\Package\Item' ), 5 );
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/**
|
||||
* Custom title for this step
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function step1CustomTitle()
|
||||
{
|
||||
return 'Adding products to search index';
|
||||
}
|
||||
|
||||
/**
|
||||
* Store certain informaiton in settings to ease performance on menu
|
||||
*
|
||||
* @return array 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 step2()
|
||||
{
|
||||
$counts = array();
|
||||
foreach ( \IPS\nexus\Gateway::roots() as $gateway )
|
||||
{
|
||||
if ( !isset( $counts[ $gateway->gateway ] ) )
|
||||
{
|
||||
$counts[ $gateway->gateway ] = 0;
|
||||
}
|
||||
|
||||
$counts[ $gateway->gateway ]++;
|
||||
}
|
||||
|
||||
\IPS\Db::i()->update( 'core_sys_conf_settings', array( 'conf_value' => json_encode( $counts ) ), array( 'conf_key=?', 'gateways_counts' ) );
|
||||
\IPS\Settings::i()->gateways_counts = json_encode( $counts );
|
||||
|
||||
unset( \IPS\Data\Store::i()->settings );
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/**
|
||||
* Custom title for this step
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function step2CustomTitle()
|
||||
{
|
||||
return 'Improving payment performance';
|
||||
}
|
||||
|
||||
/**
|
||||
* Add the subscriptions menu item
|
||||
*
|
||||
* @return array 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 step3()
|
||||
{
|
||||
\IPS\core\FrontNavigation::insertMenuItem( NULL, array( 'app' => 'nexus', 'key' => 'Subscriptions' ), \IPS\Db::i()->select( 'MAX(position)', 'core_menu' )->first() );
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/**
|
||||
* Custom title for this step
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function step3CustomTitle()
|
||||
{
|
||||
return 'Adding subscriptions menu';
|
||||
}
|
||||
}
|
||||
Whitespace-only changes.
@@ -1,22 +0,0 @@
|
||||
{
|
||||
"1": {
|
||||
"method": "addColumn",
|
||||
"params": [
|
||||
"nexus_support_departments",
|
||||
{
|
||||
"name": "dpt_subscriptions",
|
||||
"type": "TEXT",
|
||||
"length": null,
|
||||
"decimals": null,
|
||||
"values": null,
|
||||
"allow_null": true,
|
||||
"default": null,
|
||||
"comment": "",
|
||||
"unsigned": false,
|
||||
"zerofill": false,
|
||||
"auto_increment": false,
|
||||
"binary": false
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -1,74 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* @brief 4.3.0 Beta 3 Upgrade Code
|
||||
* @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 Mar 2018
|
||||
*/
|
||||
|
||||
namespace IPS\nexus\setup\upg_103003;
|
||||
|
||||
/* To prevent PHP errors (extending class does not exist) revealing path */
|
||||
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
{
|
||||
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
|
||||
exit;
|
||||
}
|
||||
|
||||
/**
|
||||
* 4.3.0 Beta 3 Upgrade Code
|
||||
*/
|
||||
class _Upgrade
|
||||
{
|
||||
/**
|
||||
* Clean up orphaned Commerce packages from 3.x
|
||||
*
|
||||
* @return array 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 step1()
|
||||
{
|
||||
/* Do we even need to do this? */
|
||||
$count = \IPS\Db::i()->select( 'COUNT(*)', 'nexus_packages', array( "p_group!=? AND " . \IPS\Db::i()->in( 'p_group', iterator_to_array( \IPS\Db::i()->select( 'pg_id', 'nexus_package_groups' ) ), TRUE ), 0 ) )->first();
|
||||
|
||||
if ( $count )
|
||||
{
|
||||
/* Create a new group */
|
||||
try
|
||||
{
|
||||
$position = (int) \IPS\Db::i()->select( 'MAX(pg_position)', 'nexus_package_groups' )->first();
|
||||
$position++;
|
||||
}
|
||||
catch( \Exception $e )
|
||||
{
|
||||
/* Technically shouldn't happen but... */
|
||||
$position = 1;
|
||||
}
|
||||
|
||||
$group = new \IPS\nexus\Package\Group;
|
||||
$group->position = $position;
|
||||
$group->save();
|
||||
\IPS\Lang::saveCustom( 'nexus', "nexus_pgroup_{$group->id}", "Products" );
|
||||
|
||||
foreach( new \IPS\Patterns\ActiveRecordIterator( \IPS\Db::i()->select( '*', 'nexus_packages', array( "p_group!=? AND " . \IPS\Db::i()->in( 'p_group', iterator_to_array( \IPS\Db::i()->select( 'pg_id', 'nexus_package_groups' ) ), TRUE ), 0 ) ), 'IPS\nexus\Package' ) AS $pkg )
|
||||
{
|
||||
$pkg->group = $group->id;
|
||||
$pkg->save();
|
||||
}
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/**
|
||||
* Custom title for this step
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function step1CustomTitle()
|
||||
{
|
||||
return 'Cleaning up orphaned commerce packages';
|
||||
}
|
||||
}
|
||||
Whitespace-only changes.
@@ -1,18 +0,0 @@
|
||||
{
|
||||
"1": {
|
||||
"method": "addIndex",
|
||||
"params": [
|
||||
"nexus_support_replies",
|
||||
{
|
||||
"type": "key",
|
||||
"name": "reply_member",
|
||||
"columns": [
|
||||
"reply_member"
|
||||
],
|
||||
"length": [
|
||||
null
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
Whitespace-only changes.
@@ -1,9 +0,0 @@
|
||||
{
|
||||
"1": {
|
||||
"method": "delete",
|
||||
"params": [
|
||||
"core_sys_lang_words",
|
||||
"word_app='nexus' AND ( word_key IN ( 'customer_no_history', 'see_all_history' ) )"
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -1,43 +0,0 @@
|
||||
{
|
||||
"1": {
|
||||
"method": "addColumn",
|
||||
"params": [
|
||||
"nexus_transactions",
|
||||
{
|
||||
"name": "t_credit",
|
||||
"type": "DECIMAL",
|
||||
"length": 10,
|
||||
"decimals": 3,
|
||||
"values": null,
|
||||
"allow_null": true,
|
||||
"default": null,
|
||||
"comment": "If transaction has been partially credited (refund to account credit), the amount that was credited",
|
||||
"unsigned": true,
|
||||
"zerofill": false,
|
||||
"auto_increment": false,
|
||||
"binary": false
|
||||
}
|
||||
]
|
||||
},
|
||||
"2": {
|
||||
"method": "changeColumn",
|
||||
"params": [
|
||||
"nexus_reviews",
|
||||
"review_ip_address",
|
||||
{
|
||||
"name": "review_ip_address",
|
||||
"type": "VARCHAR",
|
||||
"length": 46,
|
||||
"decimals": null,
|
||||
"values": [],
|
||||
"allow_null": true,
|
||||
"default": null,
|
||||
"comment": "",
|
||||
"unsigned": false,
|
||||
"zerofill": false,
|
||||
"auto_increment": false,
|
||||
"binary": false
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -1,38 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* @brief 4.3.5 Beta 1 Upgrade Code
|
||||
* @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 21 Jun 2018
|
||||
*/
|
||||
|
||||
namespace IPS\nexus\setup\upg_103026;
|
||||
|
||||
/* To prevent PHP errors (extending class does not exist) revealing path */
|
||||
if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
{
|
||||
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
|
||||
exit;
|
||||
}
|
||||
|
||||
/**
|
||||
* 4.3.5 Beta 1 Upgrade Code
|
||||
*/
|
||||
class _Upgrade
|
||||
{
|
||||
/**
|
||||
* Initate FixRefundTransactions background task
|
||||
*
|
||||
* @return array 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 step1()
|
||||
{
|
||||
\IPS\Task::queue( 'nexus', 'FixRefundTransactions' );
|
||||
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
Loaded 100 of 6736 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user