Version 4.0.13.1

This commit is contained in:
Neo committed 2025-12-19 04:57:54 -08:00
1 parent f9e857d255
commit c6a86f0d9b
7517 files changed
+597400 -668041

No files matched your search

View File
Whitespace-only changes.
Whitespace-only changes.
@@ -0,0 +1,36 @@
{
"1": {
"method": "addColumn",
"params": [
"core_members",
{
"name": "cm_credits",
"type": "TEXT"
}
]
},
"2": {
"method": "addColumn",
"params": [
"core_members",
{
"name": "cm_no_sev",
"type": "TINYINT",
"length": 1,
"default": "0"
}
]
},
"3": {
"method": "addColumn",
"params": [
"core_members",
{
"name": "cm_return_group",
"type": "SMALLINT",
"length": 3,
"default": "0"
}
]
}
}
Whitespace-only changes.
@@ -0,0 +1,42 @@
{
"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.
@@ -0,0 +1,22 @@
{
"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
}
]
}
}
@@ -0,0 +1,48 @@
<?php
/**
* @brief 4.0.0 Upgrade Code
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
* @copyright (c) 2001 - SVN_YYYY Invision Power Services, Inc.
* @license http://www.invisionpower.com/legal/standards/
* @package IPS Social Suite
* @subpackage Nexus
* @since 30 Oct 2014
* @version SVN_VERSION_NUMBER
*/
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.
@@ -0,0 +1,162 @@
{
"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.
@@ -0,0 +1,22 @@
{
"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.
@@ -0,0 +1,38 @@
{
"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.
@@ -0,0 +1,23 @@
{
"1": {
"method": "changeColumn",
"params": [
"nexus_customer_history",
"log_by",
{
"name": "log_by",
"type": "MEDIUMINT",
"length": 8,
"decimals": null,
"values": [],
"allow_null": true,
"default": "0",
"comment": "",
"unsigned": false,
"zerofill": false,
"auto_increment": false,
"binary": false
}
]
}
}
Whitespace-only changes.
@@ -0,0 +1,35 @@
{
"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.
@@ -0,0 +1,22 @@
{
"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
}
]
}
}
@@ -0,0 +1,98 @@
<?php
/**
* @brief 4.0.0 Upgrade Code
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
* @copyright (c) 2001 - SVN_YYYY Invision Power Services, Inc.
* @license http://www.invisionpower.com/legal/standards/
* @package IPS Social Suite
* @subpackage Nexus
* @since 17 Feb 2015
* @version SVN_VERSION_NUMBER
*/
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\Db::i()->update( 'core_sys_conf_settings', array( 'conf_value' => 1 ), array( 'conf_key=?', 'ads_exist' ) );
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.
@@ -0,0 +1,44 @@
{
"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
}
]
}
}
@@ -0,0 +1,87 @@
<?php
/**
* @brief 4.0.0 Upgrade Code
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
* @copyright (c) 2001 - SVN_YYYY Invision Power Services, Inc.
* @license http://www.invisionpower.com/legal/standards/
* @package IPS Social Suite
* @subpackage Nexus
* @since 19 Feb 2015
* @version SVN_VERSION_NUMBER
*/
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\Db::i()->update( 'core_sys_conf_settings', array( 'conf_value' => 'staff' ), array( 'conf_key=?', 'nexus_sout_from' ) );
break;
case 1:
\IPS\Db::i()->update( 'core_sys_conf_settings', array( 'conf_value' => 'dpt' ), array( 'conf_key=?', 'nexus_sout_from' ) );
break;
}
unset( \IPS\Data\Store::i()->settings );
return TRUE;
}
/**
* Custom title for this step
*
* @return string
*/
public function step2CustomTitle()
{
return "Fixing settings...";
}
}
Whitespace-only changes.
@@ -0,0 +1,115 @@
{
"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
]
}
]
}
}
@@ -0,0 +1,40 @@
<?php
/**
* @brief 4.0.0 RC 5 Upgrade Code
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
* @copyright (c) 2001 - SVN_YYYY Invision Power Services, Inc.
* @license http://www.invisionpower.com/legal/standards/
* @package IPS Social Suite
* @subpackage Blog
* @since 5 May 2015
* @version SVN_VERSION_NUMBER
*/
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.
@@ -0,0 +1,13 @@
{
"1": {
"method": "changeColumn",
"params": [
"nexus_customer_history",
"log_date",
{
"name": "log_date",
"type": "REAL"
}
]
}
}
Whitespace-only changes.
@@ -0,0 +1,58 @@
{
"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"
]
}
}
@@ -0,0 +1,49 @@
{
"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
]
}
]
}
}
@@ -0,0 +1,42 @@
{
"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
}
]
}
}
@@ -0,0 +1,43 @@
<?php
/**
* @brief 4.0.5 Upgrade Code
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
* @copyright (c) 2001 - SVN_YYYY Invision Power Services, Inc.
* @license http://www.invisionpower.com/legal/standards/
* @package IPS Social Suite
* @subpackage Blog
* @since 5 May 2015
* @version SVN_VERSION_NUMBER
*/
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;
}
}
@@ -0,0 +1,42 @@
{
"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
}
]
}
}
@@ -0,0 +1,61 @@
<?php
/**
* @brief 4.0.13 Upgrade Code
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
* @copyright (c) 2001 - SVN_YYYY Invision Power Services, Inc.
* @license http://www.invisionpower.com/legal/standards/
* @package IPS Social Suite
{subpackage}
* @since 11 Aug 2015
* @version SVN_VERSION_NUMBER
*/
namespace IPS\nexus\setup\upg_100044;
/* 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.13 Upgrade Code
*/
class _Upgrade
{
/**
* Remove purchases from not existing members
*
* @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;
$select = new \IPS\Patterns\ActiveRecordIterator( \IPS\Db::i()->select( '*', 'nexus_purchases', NULL, 'ps_id', array( $offset, 500) ), 'IPS\nexus\Purchase' );
if ( count ( $select ) )
{
foreach ( $select as $purchase )
{
try {
$member = \IPS\Member::load( $purchase->ps_member );
}
catch ( \OutOfRangeException $e )
{
$purchase->delete();
}
}
return $offset + 500;
}
else
{
unset( $_SESSION['_step1Count'] );
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.
@@ -0,0 +1,73 @@
{
"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.
@@ -0,0 +1,26 @@
{
"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.
@@ -0,0 +1,78 @@
{
"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.
@@ -0,0 +1,28 @@
{
"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.
@@ -0,0 +1,93 @@
{
"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.
@@ -0,0 +1,26 @@
{
"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.
@@ -0,0 +1,110 @@
{
"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",
"engine": "InnoDB"
}
]
}
}
Whitespace-only changes.
@@ -0,0 +1,256 @@
{
"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",
"engine": "InnoDB"
}
]
},
"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.
@@ -0,0 +1,39 @@
{
"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.
@@ -0,0 +1,26 @@
{
"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
}
]
}
}
@@ -0,0 +1,80 @@
<?php
/**
* @brief 1.1.0 Alpha 5 Upgrade Code
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
* @copyright (c) 2001 - SVN_YYYY Invision Power Services, Inc.
* @license http://www.invisionpower.com/legal/standards/
* @package IPS Social Suite
* @subpackage
* @since 19 Dec 2014
* @version SVN_VERSION_NUMBER
*/
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.
@@ -0,0 +1,17 @@
{
"1": {
"method": "changeColumn",
"params": [
"nexus_invoices",
"i_total",
{
"name": "i_total",
"type": "DECIMAL",
"length": 20,
"decimals": 2,
"allow_null": false,
"default": 0
}
]
}
}
Whitespace-only changes.
File diff suppressed because it is too large. Load diff
@@ -0,0 +1,171 @@
<?php
/**
* @brief 1.2 Alpha 1 Upgrade Code
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
* @copyright (c) 2001 - SVN_YYYY Invision Power Services, Inc.
* @license http://www.invisionpower.com/legal/standards/
* @package IPS Social Suite
* @subpackage
* @since 19 Dec 2014
* @version SVN_VERSION_NUMBER
*/
namespace IPS\nexus\setup\upg_11100;
/* 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.2 Alpha 1 Upgrade Code
*/
class _Upgrade
{
/**
* Packages
*
* @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 = 2;
$select = \IPS\Db::i()->select( '*', 'nexus_packages', NULL, 'p_id', array( $offset, $pergo ) );
if ( count( $select ) )
{
foreach ( $select as $row )
{
\IPS\Db::i()->insert( 'nexus_packages_products', array(
'p_id' => $row['p_id'],
'p_physical' => $row['p_physical'],
'p_shipping' => $row['p_shipping'],
'p_weight' => $row['p_weight'],
'p_lkey' => $row['p_lkey'],
'p_lkey_identifier' => $row['p_lkey_identifier'],
'p_lkey_uses' => intval( $row['p_lkey_uses'] ),
) );
}
return $offset + $pergo;
}
else
{
\IPS\Db::i()->dropColumn( 'nexus_packages', 'p_physical' );
\IPS\Db::i()->dropColumn( 'nexus_packages', 'p_shipping' );
\IPS\Db::i()->dropColumn( 'nexus_packages', 'p_weight' );
\IPS\Db::i()->dropColumn( 'nexus_packages', 'p_lkey' );
\IPS\Db::i()->dropColumn( 'nexus_packages', 'p_lkey_identifier' );
\IPS\Db::i()->dropColumn( 'nexus_packages', 'p_lkey_uses' );
return TRUE;
}
}
/**
* 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 step2()
{
if ( isset( \IPS\Request::i()->extra ) )
{
$extra = explode( ',', \IPS\Request::i()->extra );
}
else
{
$group = \IPS\Db::i()->insert( 'nexus_package_groups', array(
'pg_name' => "Advertisements",
'pg_seo_name' => 'advertisements',
'pg_parent' => 0,
) );
$extra = array( 0 => $group, 1 => 0 );
}
$offset = $extra[1];
$pergo = 2;
$select = \IPS\Db::i()->select( '*', 'nexus_adpacks', NULL, 'ap_id', array( $offset, $pergo ) );
if ( count( $select ) )
{
foreach ( $select as $row )
{
$renewals = 0;
$renewal_unit = '';
if ( in_array( $row['ap_expire_unit'], array( 'd', 'w', 'm', 'y' ) ) )
{
$renewals = $row['ap_expire'];
$renewal_unit = $row['ap_expire_unit'];
$row['ap_expire'] = 0;
$row['ap_expire_unit'] = 'i';
}
$p_id = \IPS\Db::i()->insert( 'nexus_packages', array(
'p_name' => $row['ap_name'],
'p_seo_name' => \IPS\Http\Url::seoTitle( $row['ap_name'] ),
'p_desc' => $row['ap_desc'],
'p_group' => $extra[0],
'p_stock' => -1,
'p_reg' => 0,
'p_store' => 1,
'p_member_groups' => '*',
'p_allow_upgrading' => 0,
'p_upgrade_charge' => 0,
'p_allow_downgrading' => 0,
'p_downgrade_refund' => 0,
'p_base_price' => $row['ap_price'],
'p_tax' => 0,
'p_renewals' => $renewals,
'p_renewal_price' => 0,
'p_renewal_unit' => $renewal_unit,
'p_renewal_days' => 0,
'p_primary_group' => 0,
'p_secondary_group' => 0,
'p_perm_set' => 0,
'p_return_primary' => 1,
'p_return_secondary' => 1,
'p_return_perm' => 1,
'p_module' => '',
'p_position' => $row['ap_order'],
'p_associable' => 0,
'p_force_assoc' => 0,
'p_assoc_error' => '',
'p_featured' => 0,
'p_discounts' => \serialize( array( 'loyalty' => array(), 'bundle' => array(), 'usergroup' => array() ) ),
'p_page' => 0,
'p_support' => 0,
'p_support_department' => 0,
'p_support_severity' => 0,
'p_upsell' => 0,
'p_notify' => '',
'p_type' => 'ad',
) );
\IPS\Db::i()->insert( 'nexus_packages_ads', array(
'p_id' => $p_id,
'p_locations' => $row['ap_locations'],
'p_exempt' => $row['ap_exempt'],
'p_expire' => $row['ap_expire'],
'p_expire_unit' => $row['ap_expire_unit'],
'p_max_height' => $row['ap_max_height'],
'p_max_width' => $row['ap_max_width'],
) );
\IPS\Db::i()->update( 'nexus_purchases', array( 'ps_type' => 'newad', 'ps_item_id' => $p_id ), "ps_app='nexus' AND ps_type='ad' AND ps_name='{$row['ap_name']}'" );
}
$extra[1] += $pergo;
return implode( ',', $extra );
}
else
{
\IPS\Db::i()->update( 'nexus_purchases', array( 'ps_type' => 'ad', 'ps_item_uri' => '' ), "ps_type='newad'" );
\IPS\Db::i()->dropTable( 'nexus_adpacks' );
return TRUE;
}
}
}
Whitespace-only changes.
@@ -0,0 +1,627 @@
{
"1": {
"method": "addColumn",
"params": [
"nexus_hosting_servers",
{
"name": "server_username",
"type": "VARCHAR",
"length": "64",
"allow_null": false,
"default": "root"
}
]
},
"2": {
"method": "createTable",
"params": [
{
"name": "nexus_customers",
"columns": {
"member_id": {
"allow_null": false,
"auto_increment": false,
"binary": false,
"comment": "",
"decimals": null,
"default": "0",
"length": 8,
"name": "member_id",
"type": "MEDIUMINT",
"unsigned": false,
"values": [],
"zerofill": false
},
"cm_first_name": {
"allow_null": true,
"auto_increment": false,
"binary": false,
"comment": "",
"decimals": null,
"default": null,
"length": 64,
"name": "cm_first_name",
"type": "VARCHAR",
"unsigned": false,
"values": [],
"zerofill": false
},
"cm_last_name": {
"allow_null": true,
"auto_increment": false,
"binary": false,
"comment": "",
"decimals": null,
"default": null,
"length": 64,
"name": "cm_last_name",
"type": "VARCHAR",
"unsigned": false,
"values": [],
"zerofill": false
},
"cm_address_1": {
"allow_null": true,
"auto_increment": false,
"binary": false,
"comment": "",
"decimals": null,
"default": null,
"length": 128,
"name": "cm_address_1",
"type": "VARCHAR",
"unsigned": false,
"values": [],
"zerofill": false
},
"cm_address_2": {
"allow_null": true,
"auto_increment": false,
"binary": false,
"comment": "",
"decimals": null,
"default": null,
"length": 128,
"name": "cm_address_2",
"type": "VARCHAR",
"unsigned": false,
"values": [],
"zerofill": false
},
"cm_city": {
"allow_null": true,
"auto_increment": false,
"binary": false,
"comment": "",
"decimals": null,
"default": null,
"length": 64,
"name": "cm_city",
"type": "VARCHAR",
"unsigned": false,
"values": [],
"zerofill": false
},
"cm_state": {
"allow_null": true,
"auto_increment": false,
"binary": false,
"comment": "",
"decimals": null,
"default": null,
"length": 64,
"name": "cm_state",
"type": "VARCHAR",
"unsigned": false,
"values": [],
"zerofill": false
},
"cm_zip": {
"allow_null": true,
"auto_increment": false,
"binary": false,
"comment": "",
"decimals": null,
"default": null,
"length": 12,
"name": "cm_zip",
"type": "VARCHAR",
"unsigned": false,
"values": [],
"zerofill": false
},
"cm_country": {
"allow_null": true,
"auto_increment": false,
"binary": false,
"comment": "",
"decimals": null,
"default": null,
"length": 2,
"name": "cm_country",
"type": "CHAR",
"unsigned": false,
"values": [],
"zerofill": false
},
"cm_phone": {
"allow_null": true,
"auto_increment": false,
"binary": false,
"comment": "",
"decimals": null,
"default": null,
"length": 32,
"name": "cm_phone",
"type": "VARCHAR",
"unsigned": false,
"values": [],
"zerofill": false
}
},
"indexes": {
"PRIMARY": {
"type": "primary",
"name": "PRIMARY",
"length": [
null
],
"columns": [
"member_id"
]
},
"cm_first_name": {
"type": "key",
"name": "cm_first_name",
"length": [
null
],
"columns": [
"cm_first_name"
]
},
"cm_last_name": {
"type": "key",
"name": "cm_last_name",
"length": [
null
],
"columns": [
"cm_last_name"
]
},
"cm_address_1": {
"type": "key",
"name": "cm_address_1",
"length": [
null
],
"columns": [
"cm_address_1"
]
},
"cm_address_2": {
"type": "key",
"name": "cm_address_2",
"length": [
null
],
"columns": [
"cm_address_2"
]
},
"cm_city": {
"type": "key",
"name": "cm_city",
"length": [
null
],
"columns": [
"cm_city"
]
},
"cm_state": {
"type": "key",
"name": "cm_state",
"length": [
null
],
"columns": [
"cm_state"
]
},
"cm_zip": {
"type": "key",
"name": "cm_zip",
"length": [
null
],
"columns": [
"cm_zip"
]
},
"cm_country": {
"type": "key",
"name": "cm_country",
"length": [
null
],
"columns": [
"cm_country"
]
},
"cm_phone": {
"type": "key",
"name": "cm_phone",
"length": [
null
],
"columns": [
"cm_phone"
]
}
},
"collation": "latin1_swedish_ci",
"engine": "InnoDB"
}
]
},
"3": {
"method": "createTable",
"params": [
{
"name": "nexus_customer_fields",
"columns": {
"f_id": {
"allow_null": false,
"auto_increment": true,
"binary": false,
"comment": "",
"decimals": null,
"default": null,
"length": 10,
"name": "f_id",
"type": "INT",
"unsigned": false,
"values": [],
"zerofill": false
},
"f_column": {
"allow_null": true,
"auto_increment": false,
"binary": false,
"comment": "",
"decimals": null,
"default": null,
"length": 16,
"name": "f_column",
"type": "VARCHAR",
"unsigned": false,
"values": [],
"zerofill": false
},
"f_locked": {
"allow_null": true,
"auto_increment": false,
"binary": false,
"comment": "",
"decimals": null,
"default": null,
"length": 1,
"name": "f_locked",
"type": "TINYINT",
"unsigned": false,
"values": [],
"zerofill": false
},
"f_name": {
"allow_null": true,
"auto_increment": false,
"binary": false,
"comment": "",
"decimals": null,
"default": null,
"length": 128,
"name": "f_name",
"type": "VARCHAR",
"unsigned": false,
"values": [],
"zerofill": false
},
"f_type": {
"allow_null": true,
"auto_increment": false,
"binary": false,
"comment": "",
"decimals": null,
"default": null,
"length": 10,
"name": "f_type",
"type": "VARCHAR",
"unsigned": false,
"values": [],
"zerofill": false
},
"f_extra": {
"allow_null": true,
"auto_increment": false,
"binary": false,
"comment": "",
"decimals": null,
"default": null,
"length": 0,
"name": "f_extra",
"type": "TEXT",
"unsigned": false,
"values": [],
"zerofill": false
},
"f_position": {
"allow_null": true,
"auto_increment": false,
"binary": false,
"comment": "",
"decimals": null,
"default": null,
"length": 10,
"name": "f_position",
"type": "INT",
"unsigned": false,
"values": [],
"zerofill": false
},
"f_reg_show": {
"allow_null": true,
"auto_increment": false,
"binary": false,
"comment": "",
"decimals": null,
"default": null,
"length": 1,
"name": "f_reg_show",
"type": "TINYINT",
"unsigned": false,
"values": [],
"zerofill": false
},
"f_reg_require": {
"allow_null": true,
"auto_increment": false,
"binary": false,
"comment": "",
"decimals": null,
"default": null,
"length": 1,
"name": "f_reg_require",
"type": "TINYINT",
"unsigned": false,
"values": [],
"zerofill": false
},
"f_purchase_show": {
"allow_null": true,
"auto_increment": false,
"binary": false,
"comment": "",
"decimals": null,
"default": null,
"length": 1,
"name": "f_purchase_show",
"type": "TINYINT",
"unsigned": false,
"values": [],
"zerofill": false
},
"f_purchase_require": {
"allow_null": true,
"auto_increment": false,
"binary": false,
"comment": "",
"decimals": null,
"default": null,
"length": 1,
"name": "f_purchase_require",
"type": "TINYINT",
"unsigned": false,
"values": [],
"zerofill": false
}
},
"indexes": {
"PRIMARY": {
"type": "primary",
"name": "PRIMARY",
"length": [
null
],
"columns": [
"f_id"
]
}
},
"collation": "latin1_swedish_ci",
"engine": "InnoDB"
}
]
},
"4": {
"method": "insert",
"params": [
"nexus_customer_fields",
{
"f_id": 1,
"f_column": "cm_first_name",
"f_locked": 1,
"f_name": "First Name",
"f_type": "text",
"f_extra": "",
"f_position": 1,
"f_reg_show": 0,
"f_reg_require": 0,
"f_purchase_show": 1,
"f_purchase_require": 1
}
]
},
"5": {
"method": "insert",
"params": [
"nexus_customer_fields",
{
"f_id": 1,
"f_column": "cm_last_name",
"f_locked": 1,
"f_name": "Last Name",
"f_type": "text",
"f_extra": "",
"f_position": 2,
"f_reg_show": 0,
"f_reg_require": 0,
"f_purchase_show": 1,
"f_purchase_require": 1
}
]
},
"6": {
"method": "insert",
"params": [
"nexus_customer_fields",
{
"f_id": 1,
"f_column": "cm_address_1",
"f_locked": 1,
"f_name": "Address Line 1",
"f_type": "text",
"f_extra": "",
"f_position": 3,
"f_reg_show": 0,
"f_reg_require": 0,
"f_purchase_show": 1,
"f_purchase_require": 1
}
]
},
"7": {
"method": "insert",
"params": [
"nexus_customer_fields",
{
"f_id": 1,
"f_column": "cm_address_2",
"f_locked": 1,
"f_name": "Address Line 2",
"f_type": "text",
"f_extra": "",
"f_position": 4,
"f_reg_show": 0,
"f_reg_require": 0,
"f_purchase_show": 1,
"f_purchase_require": 0
}
]
},
"8": {
"method": "insert",
"params": [
"nexus_customer_fields",
{
"f_id": 1,
"f_column": "cm_city",
"f_locked": 1,
"f_name": "City",
"f_type": "text",
"f_extra": "",
"f_position": 5,
"f_reg_show": 0,
"f_reg_require": 0,
"f_purchase_show": 1,
"f_purchase_require": 1
}
]
},
"9": {
"method": "insert",
"params": [
"nexus_customer_fields",
{
"f_id": 1,
"f_column": "cm_state",
"f_locked": 1,
"f_name": "State\/Region",
"f_type": "special",
"f_extra": "",
"f_position": 6,
"f_reg_show": 0,
"f_reg_require": 0,
"f_purchase_show": 1,
"f_purchase_require": 0
}
]
},
"10": {
"method": "insert",
"params": [
"nexus_customer_fields",
{
"f_id": 1,
"f_column": "cm_zip",
"f_locked": 1,
"f_name": "Zip\/Postcode",
"f_type": "text",
"f_extra": "",
"f_position": 7,
"f_reg_show": 0,
"f_reg_require": 0,
"f_purchase_show": 1,
"f_purchase_require": 1
}
]
},
"11": {
"method": "insert",
"params": [
"nexus_customer_fields",
{
"f_id": 1,
"f_column": "cm_country",
"f_locked": 1,
"f_name": "Country",
"f_type": "dropdown",
"f_extra": "\\nAF\\nAX\\nAL\\nDZ\\nAS\\nAD\\nAO\\nAI\\nAQ\\nAG\\nAR\\nAM\\nAW\\nAU\\nAT\\nAZ\\nBS\\nBH\\nBD\\nBB\\nBY\\nBE\\nBZ\\nBJ\\nBM\\nBT\\nBO\\nBA\\nBW\\nBV\\nBR\\nIO\\nBN\\nBG\\nBF\\nBI\\nKH\\nCM\\nCA\\nCV\\nKY\\nCF\\nTD\\nCL\\nCN\\nCX\\nCC\\nCO\\nKM\\nCG\\nCD\\nCK\\nCR\\nCI\\nHR\\nCU\\nCY\\nCZ\\nDK\\nDJ\\nDM\\nDO\\nEC\\nEG\\nSV\\nGQ\\nER\\nEE\\nET\\nFK\\nFO\\nFJ\\nFI\\nFR\\nGF\\nPF\\nTF\\nGA\\nGM\\nGE\\nDE\\nGH\\nGI\\nGR\\nGL\\nGD\\nGP\\nGU\\nGT\\nGG\\nGN\\nGW\\nGY\\nHT\\nHM\\nVA\\nHN\\nHK\\nHU\\nIS\\nIN\\nID\\nIR\\nIQ\\nIE\\nIM\\nIL\\nIT\\nJM\\nJP\\nJE\\nJO\\nKZ\\nKE\\nKI\\nKP\\nKR\\nKW\\nKG\\nLA\\nLV\\nLB\\nLS\\nLR\\nLY\\nLI\\nLT\\nLU\\nMO\\nMK\\nMG\\nMW\\nMY\\nMV\\nML\\nMT\\nMH\\nMQ\\nMR\\nMU\\nYT\\nMX\\nFM\\nMD\\nMC\\nMN\\nME\\nMS\\nMA\\nMZ\\nMM\\nNA\\nNR\\nNP\\nNL\\nAN\\nNC\\nNZ\\nNI\\nNE\\nNG\\nNU\\nNF\\nMP\\nNO\\nOM\\nPK\\nPW\\nPS\\nPA\\nPG\\nPY\\nPE\\nPH\\nPN\\nPL\\nPT\\nPR\\nQA\\nRE\\nRO\\nRU\\nRW\\nBL\\nSH\\nKN\\nLC\\nMF\\nPM\\nVC\\nWS\\nSM\\nST\\nSA\\nSN\\nRS\\nSC\\nSL\\nSG\\nSK\\nSI\\nSB\\nSO\\nZA\\nGS\\nES\\nLK\\nSD\\nSR\\nSJ\\nSZ\\nSE\\nCH\\nSY\\nTW\\nTJ\\nTZ\\nTH\\nTL\\nTG\\nTK\\nTO\\nTT\\nTN\\nTR\\nTM\\nTC\\nTV\\nUG\\nUA\\nAE\\nGB\\nUS\\nUM\\nUY\\nUZ\\nVU\\nVE\\nVN\\nVG\\nVI\\nWF\\nEH\\nYE\\nZM\\nZW",
"f_position": 8,
"f_reg_show": 0,
"f_reg_require": 1,
"f_purchase_show": 1,
"f_purchase_require": 0
}
]
},
"12": {
"method": "insert",
"params": [
"nexus_customer_fields",
{
"f_id": 1,
"f_column": "cm_phone",
"f_locked": 1,
"f_name": "Phone Number",
"f_type": "text",
"f_extra": "",
"f_position": 6,
"f_reg_show": 0,
"f_reg_require": 0,
"f_purchase_show": 1,
"f_purchase_require": 0
}
]
},
"13": {
"method": "update",
"params": [
"nexus_invoices",
{
"i_ordersteps": 0
}
]
}
}
@@ -0,0 +1,62 @@
<?php
/**
* @brief 1.2 Alpha 2 Upgrade Code
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
* @copyright (c) 2001 - SVN_YYYY Invision Power Services, Inc.
* @license http://www.invisionpower.com/legal/standards/
* @package IPS Social Suite
* @subpackage
* @since 19 Dec 2014
* @version SVN_VERSION_NUMBER
*/
namespace IPS\nexus\setup\upg_11101;
/* 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.2 Alpha 2 Upgrade Code
*/
class _Upgrade
{
/**
* Members
*
* @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 = 200;
$select = \IPS\Db::i()->select( '*', 'core_members', NULL, 'member_id', array( $offset, $pergo ) );
if ( count( $select ) )
{
foreach ( $select as $row )
{
\IPS\Db::i()->insert( 'nexus_customers', array(
'member_id' => $row['member_id'],
'cm_first_name' => $row['cm_first_name'],
'cm_last_name' => $row['cm_last_name'],
'cm_address_1' => $row['cm_address_1'],
'cm_address_2' => $row['cm_address_2'],
'cm_city' => $row['cm_city'],
'cm_state' => $row['cm_state'],
'cm_zip' => $row['cm_zip'],
'cm_country' => $row['cm_country'],
'cm_phone' => $row['cm_phone'],
) );
}
return $offset + $pergo;
}
else
{
return TRUE;
}
}
}
Whitespace-only changes.
@@ -0,0 +1,22 @@
{
"1": {
"method": "addColumn",
"params": [
"nexus_packages",
{
"name": "p_custom",
"type": "MEDIUMINT",
"length": 8,
"allow_null": false,
"default": 0
}
]
},
"2": {
"method": "dropColumn",
"params": [
"core_members",
"cm_first_name, DROP cm_last_name, DROP cm_address_1, DROP cm_address_2, DROP cm_city, DROP cm_state, DROP cm_zip, DROP cm_country, DROP cm_phone"
]
}
}
Whitespace-only changes.
@@ -0,0 +1,15 @@
{
"1": {
"method": "addColumn",
"params": [
"nexus_purchases",
{
"name": "ps_tax",
"type": "INT",
"length": 5,
"allow_null": false,
"default": 0
}
]
}
}
Whitespace-only changes.
@@ -0,0 +1,15 @@
{
"1": {
"method": "addColumn",
"params": [
"core_members",
{
"name": "cim_method",
"type": "int",
"length": 5,
"allow_null": false,
"default": 0
}
]
}
}
Whitespace-only changes.
@@ -0,0 +1,315 @@
{
"1": {
"method": "createTable",
"params": [
{
"name": "nexus_support_views",
"columns": {
"view_rid": {
"allow_null": false,
"auto_increment": false,
"binary": false,
"comment": "",
"decimals": null,
"default": "0",
"length": 10,
"name": "view_rid",
"type": "INT",
"unsigned": false,
"values": [],
"zerofill": false
},
"view_member": {
"allow_null": false,
"auto_increment": false,
"binary": false,
"comment": "",
"decimals": null,
"default": "0",
"length": 8,
"name": "view_member",
"type": "MEDIUMINT",
"unsigned": false,
"values": [],
"zerofill": false
},
"view_first": {
"allow_null": true,
"auto_increment": false,
"binary": false,
"comment": "",
"decimals": null,
"default": null,
"length": 10,
"name": "view_first",
"type": "INT",
"unsigned": false,
"values": [],
"zerofill": false
},
"view_last": {
"allow_null": true,
"auto_increment": false,
"binary": false,
"comment": "",
"decimals": null,
"default": null,
"length": 10,
"name": "view_last",
"type": "INT",
"unsigned": false,
"values": [],
"zerofill": false
},
"view_reply": {
"allow_null": true,
"auto_increment": false,
"binary": false,
"comment": "",
"decimals": null,
"default": null,
"length": 10,
"name": "view_reply",
"type": "INT",
"unsigned": false,
"values": [],
"zerofill": false
}
},
"indexes": {
"PRIMARY": {
"type": "primary",
"name": "PRIMARY",
"length": [
null,
null
],
"columns": [
"view_rid",
"view_member"
]
},
"view_last": {
"type": "key",
"name": "view_last",
"length": [
null
],
"columns": [
"view_last"
]
}
},
"collation": "utf8mb4_unicode_ci",
"engine": "InnoDB"
}
]
},
"2": {
"method": "addColumn",
"params": [
"nexus_support_requests",
{
"name": "r_ar_notify",
"type": "TINYINT",
"length": "1",
"allow_null": false,
"default": "0"
}
]
},
"3": {
"method": "update",
"params": [
"nexus_support_requests",
{
"r_ar_notify": 1
}
]
},
"4": {
"method": "addColumn",
"params": [
"nexus_transactions",
{
"name": "t_gw_id",
"type": "VARCHAR",
"length": 255,
"allow_null": false,
"default": ""
}
]
},
"5": {
"method": "addColumn",
"params": [
"nexus_alternate_contacts",
{
"name": "billing",
"type": "TINYINT",
"length": 1,
"allow_null": false,
"default": 0
}
]
},
"6": {
"method": "addColumn",
"params": [
"nexus_alternate_contacts",
{
"name": "support",
"type": "TINYINT",
"length": 1,
"allow_null": false,
"default": 0
}
]
},
"7": {
"method": "addColumn",
"params": [
"nexus_hosting_servers",
{
"name": "server_max_accounts",
"type": "INT",
"length": 5
}
]
},
"8": {
"method": "update",
"params": [
"nexus_hosting_servers",
{
"server_max_accounts": 99999
}
]
},
"9": {
"method": "addColumn",
"params": [
"nexus_support_replies",
{
"name": "reply_raw",
"type": "MEDIUMTEXT",
"default": null
}
]
},
"10": {
"method": "addColumn",
"params": [
"nexus_purchases",
{
"name": "ps_invoice_warning_sent",
"type": "TINYINT",
"length": 1,
"allow_null": false,
"default": 0
}
]
},
"11": {
"method": "addColumn",
"params": [
"nexus_packages_products",
{
"name": "p_subscription",
"type": "TINYINT",
"length": 1,
"allow_null": false,
"default": 0
}
]
},
"12": {
"method": "insert",
"params": [
"nexus_gateways",
{
"g_id": 6,
"g_key": "2checkout",
"g_name": "2CheckOut",
"g_testmode": 0,
"g_position": null,
"g_payout": 0
}
]
},
"13": {
"method": "insert",
"params": [
"nexus_paymethods",
{
"m_id": 9,
"m_gateway": 6,
"m_name": "2CheckOut",
"m_settings": "a:3:{s:3:\"sid\";s:0:\"\";s:11:\"secret_word\";s:0:\"\";s:3:\"url\";s:9:\"spurchase\";}",
"m_active": 0,
"m_position": 0
}
]
},
"14": {
"method": "addColumn",
"params": [
"nexus_invoices",
{
"name": "i_po",
"type": "VARCHAR",
"length": 255,
"allow_null": false,
"default": ""
}
]
},
"15": {
"method": "addColumn",
"params": [
"nexus_invoices",
{
"name": "i_notes",
"type": "TEXT",
"default": null
}
]
},
"16": {
"method": "addColumn",
"params": [
"nexus_support_replies",
{
"name": "reply_cc",
"type": "TEXT",
"default": null
}
]
},
"17": {
"method": "changeColumn",
"params": [
"nexus_packages_products",
"p_weight",
{
"name": "p_weight",
"type": "FLOAT",
"allow_null": false,
"default": 0
}
]
},
"18": {
"method": "addColumn",
"params": [
"nexus_coupons",
{
"name": "c_combine",
"type": "TINYINT",
"length": " 1 ",
"allow_null": false,
"default": 1
}
]
}
}
Whitespace-only changes.
@@ -0,0 +1,15 @@
{
"1": {
"method": "addColumn",
"params": [
"nexus_transactions",
{
"name": "t_ip",
"type": "varchar",
"length": "46",
"allow_null": false,
"default": "0"
}
]
}
}
Whitespace-only changes.
@@ -0,0 +1,13 @@
{
"1": {
"method": "addColumn",
"params": [
"nexus_hosting_servers",
{
"name": "server_nameservers",
"type": "TEXT",
"default": null
}
]
}
}
Whitespace-only changes.
@@ -0,0 +1,554 @@
{
"1": {
"method": "addIndex",
"params": [
"nexus_support_replies",
{
"type": "key",
"name": "reply_email",
"columns": [
"reply_email"
]
}
]
},
"2": {
"method": "addColumn",
"params": [
"nexus_hosting_servers",
{
"name": "server_cost",
"type": "FLOAT",
"allow_null": false,
"default": 0
}
]
},
"3": {
"method": "addColumn",
"params": [
"nexus_hosting_servers",
{
"name": "server_monitor",
"type": "VARCHAR",
"length": 255,
"allow_null": false,
"default": ""
}
]
},
"4": {
"method": "addColumn",
"params": [
"nexus_hosting_servers",
{
"name": "server_monitor_fails",
"type": "INT",
"length": 2,
"allow_null": false,
"default": 0
}
]
},
"5": {
"method": "addColumn",
"params": [
"nexus_hosting_servers",
{
"name": "server_monitor_last_sucess",
"type": "INT",
"length": 10,
"allow_null": false,
"default": 0
}
]
},
"6": {
"method": "addColumn",
"params": [
"nexus_hosting_servers",
{
"name": "server_monitor_version",
"type": "INT",
"length": 5,
"allow_null": false,
"default": 0
}
]
},
"7": {
"method": "addColumn",
"params": [
"nexus_hosting_servers",
{
"name": "server_dedicated",
"type": "INT",
"length": 10,
"allow_null": false,
"default": 0
}
]
},
"8": {
"method": "addColumn",
"params": [
"nexus_hosting_accounts",
{
"name": "account_exists",
"type": "TINYINT",
"length": "1",
"allow_null": false,
"default": 1
}
]
},
"9": {
"method": "addColumn",
"params": [
"nexus_ship_orders",
{
"name": "o_service",
"type": "VARCHAR",
"length": 255,
"allow_null": false,
"default": ""
}
]
},
"10": {
"method": "addColumn",
"params": [
"nexus_ship_orders",
{
"name": "o_tracknumber",
"type": "VARCHAR",
"length": 255,
"allow_null": false,
"default": ""
}
]
},
"11": {
"method": "createTable",
"params": [
{
"name": "nexus_package_images",
"columns": {
"image_id": {
"allow_null": false,
"auto_increment": true,
"binary": false,
"comment": "",
"decimals": null,
"default": null,
"length": 10,
"name": "image_id",
"type": "INT",
"unsigned": true,
"values": [],
"zerofill": false
},
"image_product": {
"allow_null": true,
"auto_increment": false,
"binary": false,
"comment": "",
"decimals": null,
"default": null,
"length": 10,
"name": "image_product",
"type": "INT",
"unsigned": false,
"values": [],
"zerofill": false
},
"image_location": {
"allow_null": true,
"auto_increment": false,
"binary": false,
"comment": "",
"decimals": null,
"default": null,
"length": 255,
"name": "image_location",
"type": "VARCHAR",
"unsigned": false,
"values": [],
"zerofill": false
},
"image_primary": {
"allow_null": true,
"auto_increment": false,
"binary": false,
"comment": "",
"decimals": null,
"default": null,
"length": 1,
"name": "image_primary",
"type": "TINYINT",
"unsigned": false,
"values": [],
"zerofill": false
},
"image_temp": {
"allow_null": true,
"auto_increment": false,
"binary": false,
"comment": "",
"decimals": null,
"default": null,
"length": 32,
"name": "image_temp",
"type": "VARCHAR",
"unsigned": false,
"values": [],
"zerofill": false
}
},
"indexes": {
"PRIMARY": {
"type": "primary",
"name": "PRIMARY",
"length": [
null
],
"columns": [
"image_id"
]
},
"image_product": {
"type": "key",
"name": "image_product",
"length": [
null
],
"columns": [
"image_product"
]
}
},
"collation": "utf8mb4_unicode_ci",
"engine": "InnoDB"
}
]
},
"12": {
"method": "createTable",
"params": [
{
"name": "nexus_reviews",
"columns": {
"review_id": {
"allow_null": false,
"auto_increment": true,
"binary": false,
"comment": "",
"decimals": null,
"default": null,
"length": 10,
"name": "review_id",
"type": "INT",
"unsigned": false,
"values": [],
"zerofill": false
},
"review_product": {
"allow_null": false,
"auto_increment": false,
"binary": false,
"comment": "",
"decimals": null,
"default": "",
"length": 10,
"name": "review_product",
"type": "INT",
"unsigned": false,
"values": [],
"zerofill": false
},
"review_author_id": {
"allow_null": true,
"auto_increment": false,
"binary": false,
"comment": "",
"decimals": null,
"default": null,
"length": 10,
"name": "review_author_id",
"type": "INT",
"unsigned": false,
"values": [],
"zerofill": false
},
"review_author_name": {
"allow_null": true,
"auto_increment": false,
"binary": false,
"comment": "",
"decimals": null,
"default": null,
"length": 255,
"name": "review_author_name",
"type": "VARCHAR",
"unsigned": false,
"values": [],
"zerofill": false
},
"review_ip_address": {
"allow_null": true,
"auto_increment": false,
"binary": false,
"comment": "",
"decimals": null,
"default": null,
"length": 16,
"name": "review_ip_address",
"type": "VARCHAR",
"unsigned": false,
"values": [],
"zerofill": false
},
"review_date": {
"allow_null": true,
"auto_increment": false,
"binary": false,
"comment": "",
"decimals": null,
"default": null,
"length": 10,
"name": "review_date",
"type": "INT",
"unsigned": false,
"values": [],
"zerofill": false
},
"review_edit_date": {
"allow_null": true,
"auto_increment": false,
"binary": false,
"comment": "",
"decimals": null,
"default": "0",
"length": 1,
"name": "review_edit_date",
"type": "INT",
"unsigned": false,
"values": [],
"zerofill": false
},
"review_approved": {
"allow_null": true,
"auto_increment": false,
"binary": false,
"comment": "",
"decimals": null,
"default": "0",
"length": 1,
"name": "review_approved",
"type": "INT",
"unsigned": false,
"values": [],
"zerofill": false
},
"review_text": {
"allow_null": true,
"auto_increment": false,
"binary": false,
"comment": "",
"decimals": null,
"default": null,
"length": 0,
"name": "review_text",
"type": "TEXT",
"unsigned": false,
"values": [],
"zerofill": false
},
"review_rating": {
"allow_null": true,
"auto_increment": false,
"binary": false,
"comment": "",
"decimals": null,
"default": null,
"length": 1,
"name": "review_rating",
"type": "SMALLINT",
"unsigned": false,
"values": [],
"zerofill": false
},
"review_useful": {
"allow_null": true,
"auto_increment": false,
"binary": false,
"comment": "",
"decimals": null,
"default": "0",
"length": 5,
"name": "review_useful",
"type": "INT",
"unsigned": false,
"values": [],
"zerofill": false
},
"review_votes": {
"allow_null": true,
"auto_increment": false,
"binary": false,
"comment": "",
"decimals": null,
"default": "0",
"length": 5,
"name": "review_votes",
"type": "INT",
"unsigned": false,
"values": [],
"zerofill": false
}
},
"indexes": {
"PRIMARY": {
"type": "primary",
"name": "PRIMARY",
"length": [
null
],
"columns": [
"review_id"
]
},
"review_product": {
"type": "key",
"name": "review_product",
"length": [
null
],
"columns": [
"review_product"
]
},
"review_author_id": {
"type": "key",
"name": "review_author_id",
"length": [
null
],
"columns": [
"review_author_id"
]
}
},
"collation": "latin1_swedish_ci",
"engine": "InnoDB"
}
]
},
"13": {
"method": "addColumn",
"params": [
"nexus_packages",
{
"name": "p_reviewable",
"type": "TINYINT",
"length": "1",
"allow_null": false,
"default": 1
}
]
},
"14": {
"method": "addColumn",
"params": [
"nexus_packages",
{
"name": "p_review_moderate",
"type": "TINYINT",
"length": 1,
"allow_null": false,
"default": 0
}
]
},
"15": {
"method": "createTable",
"params": [
{
"name": "nexus_review_rates",
"columns": {
"rr_review": {
"allow_null": false,
"auto_increment": false,
"binary": false,
"comment": "",
"decimals": null,
"default": "",
"length": 10,
"name": "rr_review",
"type": "INT",
"unsigned": true,
"values": [],
"zerofill": false
},
"rr_member": {
"allow_null": false,
"auto_increment": false,
"binary": false,
"comment": "",
"decimals": null,
"default": "0",
"length": 8,
"name": "rr_member",
"type": "MEDIUMINT",
"unsigned": false,
"values": [],
"zerofill": false
},
"rr_rate": {
"allow_null": true,
"auto_increment": false,
"binary": false,
"comment": "",
"decimals": null,
"default": null,
"length": 1,
"name": "rr_rate",
"type": "TINYINT",
"unsigned": false,
"values": [],
"zerofill": false
}
},
"indexes": {
"PRIMARY": {
"type": "primary",
"name": "PRIMARY",
"length": [
null,
null
],
"columns": [
"rr_review",
"rr_member"
]
}
},
"collation": "latin1_swedish_ci",
"engine": "InnoDB"
}
]
},
"16": {
"method": "addColumn",
"params": [
"nexus_coupons",
{
"name": "c_renewals",
"type": "TINYINT",
"length": 1,
"allow_null": false,
"default": 0
}
]
}
}
@@ -0,0 +1,56 @@
<?php
/**
* @brief 1.4.0 Beta 1 Upgrade Code
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
* @copyright (c) 2001 - SVN_YYYY Invision Power Services, Inc.
* @license http://www.invisionpower.com/legal/standards/
* @package IPS Social Suite
* @subpackage
* @since 19 Dec 2014
* @version SVN_VERSION_NUMBER
*/
namespace IPS\nexus\setup\upg_14000;
/* 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.4.0 Beta 1 Upgrade Code
*/
class _Upgrade
{
/**
* Package Images
*
* @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_packages', "p_image<>''", 'p_id', array( $offset, $pergo ) );
if ( count( $select ) )
{
foreach ( $select as $row )
{
\IPS\Db::i()->insert( 'nexus_package_images', array(
'image_product' => $row['p_id'],
'image_location' => $row['p_image'],
'image_primary' => 1,
) );
}
return $offset + $pergo;
}
else
{
\IPS\Db::i()->dropColumn( 'nexus_packages', 'p_image' );
return TRUE;
}
}
}
Whitespace-only changes.
@@ -0,0 +1,16 @@
{
"1": {
"method": "delete",
"params": [
"core_sys_settings_titles",
"conf_title_keyword='nexus'"
]
},
"2": {
"method": "delete",
"params": [
"core_sys_conf_settings",
"conf_key='nexus_donations_on'"
]
}
}
Whitespace-only changes.
@@ -0,0 +1,40 @@
<?php
/**
* @brief 1.4.2 Upgrade Code
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
* @copyright (c) 2001 - SVN_YYYY Invision Power Services, Inc.
* @license http://www.invisionpower.com/legal/standards/
* @package IPS Social Suite
* @subpackage
* @since 19 Dec 2014
* @version SVN_VERSION_NUMBER
*/
namespace IPS\nexus\setup\upg_14004;
/* 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.4.2 Upgrade Code
*/
class _Upgrade
{
/**
* Drop p_image if it exists
*
* @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()->checkForColumn( 'nexus_packages', 'p_image' ) )
{
\IPS\Db::i()->dropColumn( 'nexus_packages', 'p_image' );
}
return TRUE;
}
}
Whitespace-only changes.
@@ -0,0 +1,951 @@
{
"1": {
"method": "insert",
"params": [
"nexus_gateways",
{
"g_key": "stripe",
"g_name": "Stripe",
"g_testmode": 0,
"g_position": null,
"g_payout": 0
}
]
},
"2": {
"method": "insert",
"params": [
"nexus_gateways",
{
"g_key": "sagepay",
"g_name": "Sage Pay (Form Integration)",
"g_testmode": 0,
"g_position": null,
"g_payout": 0
}
]
},
"3": {
"method": "createTable",
"params": [
{
"name": "nexus_fraud_rules",
"columns": {
"f_id": {
"allow_null": false,
"auto_increment": true,
"binary": false,
"comment": "",
"decimals": null,
"default": null,
"length": 10,
"name": "f_id",
"type": "INT",
"unsigned": true,
"values": [],
"zerofill": false
},
"f_name": {
"allow_null": true,
"auto_increment": false,
"binary": false,
"comment": "",
"decimals": null,
"default": null,
"length": 255,
"name": "f_name",
"type": "VARCHAR",
"unsigned": false,
"values": [],
"zerofill": false
},
"f_groups": {
"allow_null": true,
"auto_increment": false,
"binary": false,
"comment": "",
"decimals": null,
"default": null,
"length": 0,
"name": "f_groups",
"type": "TEXT",
"unsigned": false,
"values": [],
"zerofill": false
},
"f_amount": {
"allow_null": true,
"auto_increment": false,
"binary": false,
"comment": "",
"decimals": null,
"default": null,
"length": 1,
"name": "f_amount",
"type": "CHAR",
"unsigned": false,
"values": [],
"zerofill": false
},
"f_amount_unit": {
"allow_null": true,
"auto_increment": false,
"binary": false,
"comment": "",
"decimals": null,
"default": null,
"length": 3,
"name": "f_amount_unit",
"type": "INT",
"unsigned": false,
"values": [],
"zerofill": false
},
"f_methods": {
"allow_null": true,
"auto_increment": false,
"binary": false,
"comment": "",
"decimals": null,
"default": null,
"length": 0,
"name": "f_methods",
"type": "TEXT",
"unsigned": false,
"values": [],
"zerofill": false
},
"f_voucher": {
"allow_null": true,
"auto_increment": false,
"binary": false,
"comment": "",
"decimals": null,
"default": null,
"length": 1,
"name": "f_voucher",
"type": "TINYINT",
"unsigned": false,
"values": [],
"zerofill": false
},
"f_email": {
"allow_null": true,
"auto_increment": false,
"binary": false,
"comment": "",
"decimals": null,
"default": "",
"length": 1,
"name": "f_email",
"type": "CHAR",
"unsigned": false,
"values": [],
"zerofill": false
},
"f_email_unit": {
"allow_null": true,
"auto_increment": false,
"binary": false,
"comment": "",
"decimals": null,
"default": null,
"length": 255,
"name": "f_email_unit",
"type": "VARCHAR",
"unsigned": false,
"values": [],
"zerofill": false
},
"f_country": {
"allow_null": true,
"auto_increment": false,
"binary": false,
"comment": "",
"decimals": null,
"default": null,
"length": 0,
"name": "f_country",
"type": "TEXT",
"unsigned": false,
"values": [],
"zerofill": false
},
"f_maxmind": {
"allow_null": true,
"auto_increment": false,
"binary": false,
"comment": "",
"decimals": null,
"default": null,
"length": 1,
"name": "f_maxmind",
"type": "CHAR",
"unsigned": false,
"values": [],
"zerofill": false
},
"f_maxmind_unit": {
"allow_null": true,
"auto_increment": false,
"binary": false,
"comment": "",
"decimals": null,
"default": null,
"length": 3,
"name": "f_maxmind_unit",
"type": "INT",
"unsigned": false,
"values": [],
"zerofill": false
},
"f_maxmind_address_valid": {
"allow_null": true,
"auto_increment": false,
"binary": false,
"comment": "",
"decimals": null,
"default": null,
"length": 1,
"name": "f_maxmind_address_valid",
"type": "TINYINT",
"unsigned": false,
"values": [],
"zerofill": false
},
"f_maxmind_address_match": {
"allow_null": true,
"auto_increment": false,
"binary": false,
"comment": "",
"decimals": null,
"default": null,
"length": 1,
"name": "f_maxmind_address_match",
"type": "TINYINT",
"unsigned": false,
"values": [],
"zerofill": false
},
"f_maxmind_proxy": {
"allow_null": true,
"auto_increment": false,
"binary": false,
"comment": "",
"decimals": null,
"default": null,
"length": 1,
"name": "f_maxmind_proxy",
"type": "CHAR",
"unsigned": false,
"values": [],
"zerofill": false
},
"f_maxmind_proxy_unit": {
"allow_null": true,
"auto_increment": false,
"binary": false,
"comment": "",
"decimals": null,
"default": null,
"length": 2,
"name": "f_maxmind_proxy_unit",
"type": "INT",
"unsigned": false,
"values": [],
"zerofill": false
},
"f_maxmind_freeemail": {
"allow_null": true,
"auto_increment": false,
"binary": false,
"comment": "",
"decimals": null,
"default": null,
"length": 1,
"name": "f_maxmind_freeemail",
"type": "TINYINT",
"unsigned": false,
"values": [],
"zerofill": false
},
"f_maxmind_phone_match": {
"allow_null": true,
"auto_increment": false,
"binary": false,
"comment": "",
"decimals": null,
"default": null,
"length": 1,
"name": "f_maxmind_phone_match",
"type": "TINYINT",
"unsigned": false,
"values": [],
"zerofill": false
},
"f_maxmind_riskyemail": {
"allow_null": true,
"auto_increment": false,
"binary": false,
"comment": "",
"decimals": null,
"default": null,
"length": 1,
"name": "f_maxmind_riskyemail",
"type": "TINYINT",
"unsigned": false,
"values": [],
"zerofill": false
},
"f_maxmind_riskyusername": {
"allow_null": true,
"auto_increment": false,
"binary": false,
"comment": "",
"decimals": null,
"default": null,
"length": 1,
"name": "f_maxmind_riskyusername",
"type": "TINYINT",
"unsigned": false,
"values": [],
"zerofill": false
},
"f_trans_okay": {
"allow_null": true,
"auto_increment": false,
"binary": false,
"comment": "",
"decimals": null,
"default": null,
"length": 1,
"name": "f_trans_okay",
"type": "CHAR",
"unsigned": false,
"values": [],
"zerofill": false
},
"f_trans_okay_unit": {
"allow_null": true,
"auto_increment": false,
"binary": false,
"comment": "",
"decimals": null,
"default": null,
"length": 3,
"name": "f_trans_okay_unit",
"type": "INT",
"unsigned": false,
"values": [],
"zerofill": false
},
"f_trans_fraud": {
"allow_null": true,
"auto_increment": false,
"binary": false,
"comment": "",
"decimals": null,
"default": null,
"length": 1,
"name": "f_trans_fraud",
"type": "CHAR",
"unsigned": false,
"values": [],
"zerofill": false
},
"f_trans_fraud_unit": {
"allow_null": true,
"auto_increment": false,
"binary": false,
"comment": "",
"decimals": null,
"default": null,
"length": 3,
"name": "f_trans_fraud_unit",
"type": "INT",
"unsigned": false,
"values": [],
"zerofill": false
},
"f_action": {
"allow_null": true,
"auto_increment": false,
"binary": false,
"comment": "",
"decimals": null,
"default": null,
"length": 4,
"name": "f_action",
"type": "CHAR",
"unsigned": false,
"values": [],
"zerofill": false
},
"f_action_ban": {
"allow_null": true,
"auto_increment": false,
"binary": false,
"comment": "",
"decimals": null,
"default": null,
"length": 1,
"name": "f_action_ban",
"type": "TINYINT",
"unsigned": false,
"values": [],
"zerofill": false
},
"f_order": {
"allow_null": true,
"auto_increment": false,
"binary": false,
"comment": "",
"decimals": null,
"default": null,
"length": 10,
"name": "f_order",
"type": "INT",
"unsigned": false,
"values": [],
"zerofill": false
}
},
"indexes": {
"PRIMARY": {
"type": "primary",
"name": "PRIMARY",
"length": [
null
],
"columns": [
"f_id"
]
}
},
"collation": "latin1_swedish_ci",
"engine": "InnoDB"
}
]
},
"4": {
"method": "addColumn",
"params": [
"nexus_transactions",
{
"name": "t_fraud_blocked",
"type": "INT",
"length": 10,
"allow_null": false,
"default": 0
}
]
},
"5": {
"method": "addColumn",
"params": [
"nexus_transactions",
{
"name": "t_fraud_checked",
"type": "TINYINT",
"length": 1,
"allow_null": false,
"default": 0
}
]
},
"6": {
"method": "addIndex",
"params": [
"nexus_transactions",
{
"type": "key",
"name": "t_invoice",
"columns": [
"t_invoice"
]
}
]
},
"7": {
"method": "addIndex",
"params": [
"nexus_transactions",
{
"type": "key",
"name": "t_member",
"columns": [
"t_member",
"t_status"
]
}
]
},
"8": {
"method": "addIndex",
"params": [
"nexus_transactions",
{
"type": "key",
"name": "t_member2",
"columns": [
"t_member",
"t_status",
"t_fraud_blocked"
]
}
]
},
"9": {
"method": "addColumn",
"params": [
"nexus_packages",
{
"name": "p_methods",
"type": "TEXT",
"allow_null": true
}
]
},
"10": {
"method": "createTable",
"params": [
{
"name": "nexus_referral_rules",
"columns": {
"rrule_id": {
"allow_null": false,
"auto_increment": true,
"binary": false,
"comment": "",
"decimals": null,
"default": null,
"length": 10,
"name": "rrule_id",
"type": "INT",
"unsigned": true,
"values": [],
"zerofill": false
},
"rrule_name": {
"allow_null": true,
"auto_increment": false,
"binary": false,
"comment": "",
"decimals": null,
"default": null,
"length": 255,
"name": "rrule_name",
"type": "VARCHAR",
"unsigned": false,
"values": [],
"zerofill": false
},
"rrule_by_purchases_type": {
"allow_null": true,
"auto_increment": false,
"binary": false,
"comment": "",
"decimals": null,
"default": null,
"length": 1,
"name": "rrule_by_purchases_type",
"type": "CHAR",
"unsigned": false,
"values": [],
"zerofill": false
},
"rrule_by_purchases_op": {
"allow_null": true,
"auto_increment": false,
"binary": false,
"comment": "",
"decimals": null,
"default": null,
"length": 1,
"name": "rrule_by_purchases_op",
"type": "CHAR",
"unsigned": false,
"values": [],
"zerofill": false
},
"rrule_by_purchases_unit": {
"allow_null": true,
"auto_increment": false,
"binary": false,
"comment": "",
"decimals": null,
"default": null,
"length": 10,
"name": "rrule_by_purchases_unit",
"type": "INT",
"unsigned": false,
"values": [],
"zerofill": false
},
"rrule_by_group": {
"allow_null": true,
"auto_increment": false,
"binary": false,
"comment": "",
"decimals": null,
"default": null,
"length": 0,
"name": "rrule_by_group",
"type": "TEXT",
"unsigned": false,
"values": [],
"zerofill": false
},
"rrule_for_purchases_type": {
"allow_null": true,
"auto_increment": false,
"binary": false,
"comment": "",
"decimals": null,
"default": null,
"length": 1,
"name": "rrule_for_purchases_type",
"type": "CHAR",
"unsigned": false,
"values": [],
"zerofill": false
},
"rrule_for_purchases_op": {
"allow_null": true,
"auto_increment": false,
"binary": false,
"comment": "",
"decimals": null,
"default": null,
"length": 1,
"name": "rrule_for_purchases_op",
"type": "CHAR",
"unsigned": false,
"values": [],
"zerofill": false
},
"rrule_for_purchases_unit": {
"allow_null": true,
"auto_increment": false,
"binary": false,
"comment": "",
"decimals": null,
"default": null,
"length": 10,
"name": "rrule_for_purchases_unit",
"type": "INT",
"unsigned": false,
"values": [],
"zerofill": false
},
"rrule_for_group": {
"allow_null": true,
"auto_increment": false,
"binary": false,
"comment": "",
"decimals": null,
"default": null,
"length": 0,
"name": "rrule_for_group",
"type": "TEXT",
"unsigned": false,
"values": [],
"zerofill": false
},
"rrule_purchase_packages": {
"allow_null": true,
"auto_increment": false,
"binary": false,
"comment": "",
"decimals": null,
"default": null,
"length": 0,
"name": "rrule_purchase_packages",
"type": "TEXT",
"unsigned": false,
"values": [],
"zerofill": false
},
"rrule_purchase_any": {
"allow_null": true,
"auto_increment": false,
"binary": false,
"comment": "",
"decimals": null,
"default": null,
"length": 1,
"name": "rrule_purchase_any",
"type": "TINYINT",
"unsigned": false,
"values": [],
"zerofill": false
},
"rrule_purchase_package_limit": {
"allow_null": true,
"auto_increment": false,
"binary": false,
"comment": "",
"decimals": null,
"default": null,
"length": 1,
"name": "rrule_purchase_package_limit",
"type": "TINYINT",
"unsigned": false,
"values": [],
"zerofill": false
},
"rrule_purchase_renewal": {
"allow_null": true,
"auto_increment": false,
"binary": false,
"comment": "",
"decimals": null,
"default": null,
"length": 1,
"name": "rrule_purchase_renewal",
"type": "TINYINT",
"unsigned": false,
"values": [],
"zerofill": false
},
"rrule_purchase_amount_op": {
"allow_null": true,
"auto_increment": false,
"binary": false,
"comment": "",
"decimals": null,
"default": null,
"length": 1,
"name": "rrule_purchase_amount_op",
"type": "CHAR",
"unsigned": false,
"values": [],
"zerofill": false
},
"rrule_purchase_amount_unit": {
"allow_null": true,
"auto_increment": false,
"binary": false,
"comment": "",
"decimals": null,
"default": null,
"length": 10,
"name": "rrule_purchase_amount_unit",
"type": "INT",
"unsigned": false,
"values": [],
"zerofill": false
},
"rrule_commission": {
"allow_null": true,
"auto_increment": false,
"binary": false,
"comment": "",
"decimals": null,
"default": null,
"length": 3,
"name": "rrule_commission",
"type": "INT",
"unsigned": false,
"values": [],
"zerofill": false
},
"rrule_commission_limit": {
"allow_null": true,
"auto_increment": false,
"binary": false,
"comment": "",
"decimals": null,
"default": null,
"length": 10,
"name": "rrule_commission_limit",
"type": "INT",
"unsigned": false,
"values": [],
"zerofill": false
}
},
"indexes": {
"PRIMARY": {
"type": "primary",
"name": "PRIMARY",
"length": [
null
],
"columns": [
"rrule_id"
]
}
},
"collation": "latin1_swedish_ci",
"engine": "InnoDB"
}
]
},
"11": {
"method": "addColumn",
"params": [
"nexus_support_departments",
{
"name": "dpt_ppi",
"type": "FLOAT",
"allow_null": false,
"default": 0
}
]
},
"12": {
"method": "addColumn",
"params": [
"nexus_support_tracker",
{
"name": "notify",
"type": "TINYINT",
"length": 1,
"allow_null": false,
"default": 0
}
]
},
"13": {
"method": "addColumn",
"params": [
"nexus_support_replies",
{
"name": "reply_textformat",
"type": "CHAR",
"length": 1,
"allow_null": false,
"default": ""
}
]
},
"14": {
"method": "createTable",
"params": [
{
"name": "nexus_support_ratings",
"columns": {
"rating_reply": {
"allow_null": false,
"auto_increment": false,
"binary": false,
"comment": "",
"decimals": null,
"default": "0",
"length": 10,
"name": "rating_reply",
"type": "INT",
"unsigned": true,
"values": [],
"zerofill": false
},
"rating_rating": {
"allow_null": true,
"auto_increment": false,
"binary": false,
"comment": "",
"decimals": null,
"default": null,
"length": 1,
"name": "rating_rating",
"type": "SMALLINT",
"unsigned": false,
"values": [],
"zerofill": false
},
"rating_from": {
"allow_null": true,
"auto_increment": false,
"binary": false,
"comment": "",
"decimals": null,
"default": null,
"length": 8,
"name": "rating_from",
"type": "MEDIUMINT",
"unsigned": false,
"values": [],
"zerofill": false
},
"rating_staff": {
"allow_null": true,
"auto_increment": false,
"binary": false,
"comment": "",
"decimals": null,
"default": null,
"length": 8,
"name": "rating_staff",
"type": "MEDIUMINT",
"unsigned": false,
"values": [],
"zerofill": false
},
"rating_note": {
"allow_null": true,
"auto_increment": false,
"binary": false,
"comment": "",
"decimals": null,
"default": null,
"length": 0,
"name": "rating_note",
"type": "TEXT",
"unsigned": false,
"values": [],
"zerofill": false
},
"rating_date": {
"allow_null": true,
"auto_increment": false,
"binary": false,
"comment": "",
"decimals": null,
"default": null,
"length": 10,
"name": "rating_date",
"type": "INT",
"unsigned": false,
"values": [],
"zerofill": false
}
},
"indexes": {
"PRIMARY": {
"type": "primary",
"name": "PRIMARY",
"length": [
null
],
"columns": [
"rating_reply"
]
},
"rating_staff": {
"type": "key",
"name": "rating_staff",
"length": [
null
],
"columns": [
"rating_staff"
]
},
"rating_date": {
"type": "key",
"name": "rating_date",
"length": [
null
],
"columns": [
"rating_date"
]
}
},
"collation": "utf8mb4_unicode_ci",
"engine": "InnoDB"
}
]
}
}
@@ -0,0 +1,65 @@
<?php
/**
* @brief 1.5.0 Alpha 1 Upgrade Code
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
* @copyright (c) 2001 - SVN_YYYY Invision Power Services, Inc.
* @license http://www.invisionpower.com/legal/standards/
* @package IPS Social Suite
* @subpackage
* @since 19 Dec 2014
* @version SVN_VERSION_NUMBER
*/
namespace IPS\nexus\setup\upg_15000;
/* 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.5.0 Alpha 1 Upgrade Code
*/
class _Upgrade
{
/**
* Convert MaxMind settings into fraud rules
*
* @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\Settings::i()->maxmind_hold )
{
\IPS\Db::i()->insert( 'nexus_fraud_rules', array(
'f_name' => "MaxMind Hold",
'f_groups' => '*',
'f_methods' => '*',
'f_maxmind' => 'g',
'f_maxmind_unit' => \IPS\Settings::i()->maxmind_hold,
'f_action' => 'hold',
'f_order' => 1,
) );
}
if ( \IPS\Settings::i()->maxmind_decline )
{
\IPS\Db::i()->insert( 'nexus_fraud_rules', array(
'f_name' => "MaxMind Decline",
'f_groups' => '*',
'f_methods' => '*',
'f_maxmind' => 'g',
'f_maxmind_unit' => \IPS\Settings::i()->maxmind_decline,
'f_action' => 'fail',
'f_order' => 2,
) );
}
\IPS\Db::i()->delete( 'core_sys_conf_settings', "conf_key='maxmind_hold'" );
\IPS\Db::i()->delete( 'core_sys_conf_settings', "conf_key='maxmind_decline'" );
return TRUE;
}
}
Whitespace-only changes.
@@ -0,0 +1,292 @@
{
"1": {
"method": "createTable",
"params": [
{
"name": "nexus_support_fields",
"columns": {
"sf_id": {
"allow_null": false,
"auto_increment": true,
"binary": false,
"comment": "",
"decimals": null,
"default": null,
"length": 5,
"name": "sf_id",
"type": "INT",
"unsigned": false,
"values": [],
"zerofill": false
},
"sf_name": {
"allow_null": true,
"auto_increment": false,
"binary": false,
"comment": "",
"decimals": null,
"default": null,
"length": 128,
"name": "sf_name",
"type": "VARCHAR",
"unsigned": false,
"values": [],
"zerofill": false
},
"sf_desc": {
"allow_null": true,
"auto_increment": false,
"binary": false,
"comment": "",
"decimals": null,
"default": null,
"length": 0,
"name": "sf_desc",
"type": "TEXT",
"unsigned": false,
"values": [],
"zerofill": false
},
"sf_type": {
"allow_null": true,
"auto_increment": false,
"binary": false,
"comment": "",
"decimals": null,
"default": null,
"length": 10,
"name": "sf_type",
"type": "VARCHAR",
"unsigned": false,
"values": [],
"zerofill": false
},
"sf_extra": {
"allow_null": true,
"auto_increment": false,
"binary": false,
"comment": "",
"decimals": null,
"default": null,
"length": 0,
"name": "sf_extra",
"type": "TEXT",
"unsigned": false,
"values": [],
"zerofill": false
},
"sf_departments": {
"allow_null": true,
"auto_increment": false,
"binary": false,
"comment": "",
"decimals": null,
"default": null,
"length": 0,
"name": "sf_departments",
"type": "TEXT",
"unsigned": false,
"values": [],
"zerofill": false
},
"sf_position": {
"allow_null": false,
"auto_increment": false,
"binary": false,
"comment": "",
"decimals": null,
"default": "0",
"length": 5,
"name": "sf_position",
"type": "INT",
"unsigned": false,
"values": [],
"zerofill": false
},
"sf_required": {
"allow_null": false,
"auto_increment": false,
"binary": false,
"comment": "",
"decimals": null,
"default": "0",
"length": 1,
"name": "sf_required",
"type": "TINYINT",
"unsigned": false,
"values": [],
"zerofill": false
}
},
"indexes": {
"PRIMARY": {
"type": "primary",
"name": "PRIMARY",
"length": [
null
],
"columns": [
"sf_id"
]
},
"sf_position": {
"type": "key",
"name": "sf_position",
"length": [
null
],
"columns": [
"sf_position"
]
}
},
"collation": "latin1_swedish_ci",
"engine": "InnoDB"
}
]
},
"2": {
"method": "addColumn",
"params": [
"nexus_support_requests",
{
"name": "r_cfields",
"type": "TEXT",
"allow_null": true
}
]
},
"3": {
"method": "addColumn",
"params": [
"nexus_hosting_servers",
{
"name": "server_monitor_acknowledged",
"type": "TINYINT",
"length": 1,
"allow_null": false,
"default": 0
}
]
},
"4": {
"method": "addColumn",
"params": [
"nexus_ship_orders",
{
"name": "o_api",
"type": "VARCHAR",
"length": 32,
"allow_null": false,
"default": ""
}
]
},
"5": {
"method": "addColumn",
"params": [
"nexus_ship_orders",
{
"name": "o_api_service",
"type": "VARCHAR",
"length": 32,
"allow_null": false,
"default": ""
}
]
},
"6": {
"method": "addColumn",
"params": [
"nexus_ship_orders",
{
"name": "o_label",
"type": "TEXT",
"allow_null": true
}
]
},
"7": {
"method": "addColumn",
"params": [
"nexus_ship_orders",
{
"name": "o_extra",
"type": "TEXT",
"allow_null": true
}
]
},
"8": {
"method": "addColumn",
"params": [
"nexus_invoices",
{
"name": "i_shipaddress",
"type": "TEXT",
"allow_null": true
}
]
},
"9": {
"method": "insert",
"params": [
"nexus_gateways",
{
"g_key": "authnetdpm",
"g_name": "Authorize.Net (DPM)",
"g_testmode": 0,
"g_position": 6,
"g_payout": 0
}
]
},
"10": {
"method": "addColumn",
"params": [
"nexus_hosting_servers",
{
"name": "server_extra",
"type": "TEXT",
"allow_null": true
}
]
},
"11": {
"method": "addColumn",
"params": [
"nexus_packages",
{
"name": "p_group_renewals",
"type": "TINYINT",
"length": 1,
"allow_null": false,
"default": 0
}
]
},
"12": {
"method": "addColumn",
"params": [
"nexus_purchases",
{
"name": "ps_can_reactivate",
"type": "TINYINT",
"length": 1,
"allow_null": false,
"default": 0
}
]
},
"13": {
"method": "addColumn",
"params": [
"nexus_purchases",
{
"name": "ps_grouped_renewals",
"type": "TEXT",
"allow_null": true
}
]
}
}
@@ -0,0 +1,69 @@
<?php
/**
* @brief 1.5.0 Alpha 2 Upgrade Code
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
* @copyright (c) 2001 - SVN_YYYY Invision Power Services, Inc.
* @license http://www.invisionpower.com/legal/standards/
* @package IPS Social Suite
* @subpackage
* @since 19 Dec 2014
* @version SVN_VERSION_NUMBER
*/
namespace IPS\nexus\setup\upg_15001;
/* 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.5.0 Alpha 2 Upgrade Code
*/
class _Upgrade
{
/**
* Convert renewal options
*
* @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 ( !isset( \IPS\Request::i()->extra ) )
{
\IPS\Db::i()->addColumn( 'nexus_packages', array( 'name' => 'p_renew_options', 'type' => 'TEXT' ) );
}
$offset = isset( \IPS\Request::i()->extra ) ? intval( \IPS\Request::i()->extra ) : 0;
$pergo = 50;
$select = \IPS\Db::i()->select( '*', 'nexus_packages', NULL, 'p_id', array( $offset, $pergo ) );
if ( count( $select ) )
{
foreach ( $select as $row )
{
$renewalOptions = array();
if ( $row['p_renewals'] )
{
$renewalOptions[] = array(
'unit' => $row['p_renewal_unit'],
'term' => $row['p_renewals'],
'price' => $row['p_renewal_price'] ? $row['p_renewal_price'] : $row['p_base_price'],
);
}
\IPS\Db::i()->update( 'nexus_packages', array( 'p_renew_options' => \serialize( $renewalOptions ) ), "p_id={$row['p_id']}" );
}
return $offset + $pergo;
}
else
{
\IPS\Db::i()->dropColumn( 'nexus_packages', 'p_renewals' );
\IPS\Db::i()->dropColumn( 'nexus_packages', 'p_renewal_price' );
\IPS\Db::i()->dropColumn( 'nexus_packages', 'p_renewal_unit' );
return TRUE;
}
}
}
Whitespace-only changes.
@@ -0,0 +1,15 @@
{
"1": {
"method": "addColumn",
"params": [
"nexus_packages",
{
"name": "p_rebuild_thumb",
"type": "TINYINT",
"length": 1,
"allow_null": false,
"default": 0
}
]
}
}
Whitespace-only changes.
@@ -0,0 +1,122 @@
{
"1": {
"method": "createTable",
"params": [
{
"name": "nexus_eom",
"columns": {
"eom_id": {
"allow_null": false,
"auto_increment": true,
"binary": false,
"comment": "",
"decimals": null,
"default": null,
"length": 10,
"name": "eom_id",
"type": "INT",
"unsigned": true,
"values": [],
"zerofill": false
},
"eom_url": {
"allow_null": true,
"auto_increment": false,
"binary": false,
"comment": "",
"decimals": null,
"default": "",
"length": 255,
"name": "eom_url",
"type": "VARCHAR",
"unsigned": false,
"values": [],
"zerofill": false
},
"eom_type": {
"allow_null": true,
"auto_increment": false,
"binary": false,
"comment": "",
"decimals": null,
"default": null,
"length": 1,
"name": "eom_type",
"type": "CHAR",
"unsigned": false,
"values": [],
"zerofill": false
},
"eom_value": {
"allow_null": true,
"auto_increment": false,
"binary": false,
"comment": "",
"decimals": null,
"default": null,
"length": 0,
"name": "eom_value",
"type": "TEXT",
"unsigned": false,
"values": [],
"zerofill": false
},
"eom_notify": {
"allow_null": true,
"auto_increment": false,
"binary": false,
"comment": "",
"decimals": null,
"default": null,
"length": 0,
"name": "eom_notify",
"type": "TEXT",
"unsigned": false,
"values": [],
"zerofill": false
}
},
"indexes": {
"PRIMARY": {
"type": "primary",
"name": "PRIMARY",
"length": [
null
],
"columns": [
"eom_id"
]
}
},
"collation": "utf8mb4_unicode_ci",
"engine": "InnoDB"
}
]
},
"2": {
"method": "addColumn",
"params": [
"nexus_packages",
{
"name": "p_image",
"type": "VARCHAR",
"length": 255,
"default": ""
}
]
},
"3": {
"method": "changeColumn",
"params": [
"nexus_purchases",
"ps_invoice_pending",
{
"name": "ps_invoice_pending",
"type": "INT",
"length": 10,
"allow_null": false,
"default": 0
}
]
}
}
@@ -0,0 +1,55 @@
<?php
/**
* @brief 1.5.0 Beta 1 Upgrade Code
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
* @copyright (c) 2001 - SVN_YYYY Invision Power Services, Inc.
* @license http://www.invisionpower.com/legal/standards/
* @package IPS Social Suite
* @subpackage
* @since 19 Dec 2014
* @version SVN_VERSION_NUMBER
*/
namespace IPS\nexus\setup\upg_15003;
/* 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.5.0 Beta 1 Upgrade Code
*/
class _Upgrade
{
/**
* Set primary images
*
* @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_packages', NULL, 'p_id', array( $offset, $pergo ) );
if ( count( $select ) )
{
foreach ( $select as $row )
{
try
{
\IPS\Db::i()->update( 'nexus_packages', array( 'p_image' => \IPS\Db::i()->select( 'image_location', 'nexus_package_images', "image_product={$row['p_id']} AND image_primary=1" )->first() ), "p_id={$row['p_id']}" );
}
catch ( \UnderflowException $e ) { }
}
return $offset + $pergo;
}
else
{
return TRUE;
}
}
}
Whitespace-only changes.
@@ -0,0 +1,110 @@
{
"1": {
"method": "createTable",
"params": [
{
"name": "nexus_donate_logs",
"columns": {
"dl_id": {
"allow_null": false,
"auto_increment": true,
"binary": false,
"comment": "",
"decimals": null,
"default": null,
"length": 10,
"name": "dl_id",
"type": "INT",
"unsigned": true,
"values": [],
"zerofill": false
},
"dl_goal": {
"allow_null": true,
"auto_increment": false,
"binary": false,
"comment": "",
"decimals": null,
"default": null,
"length": 10,
"name": "dl_goal",
"type": "INT",
"unsigned": false,
"values": [],
"zerofill": false
},
"dl_member": {
"allow_null": true,
"auto_increment": false,
"binary": false,
"comment": "",
"decimals": null,
"default": null,
"length": 8,
"name": "dl_member",
"type": "MEDIUMINT",
"unsigned": false,
"values": [],
"zerofill": false
},
"dl_amount": {
"allow_null": true,
"auto_increment": false,
"binary": false,
"comment": "",
"decimals": null,
"default": null,
"length": 0,
"name": "dl_amount",
"type": "FLOAT",
"unsigned": false,
"values": [],
"zerofill": false
},
"dl_invoice": {
"allow_null": true,
"auto_increment": false,
"binary": false,
"comment": "",
"decimals": null,
"default": null,
"length": 10,
"name": "dl_invoice",
"type": "INT",
"unsigned": false,
"values": [],
"zerofill": false
},
"dl_date": {
"allow_null": true,
"auto_increment": false,
"binary": false,
"comment": "",
"decimals": null,
"default": null,
"length": 10,
"name": "dl_date",
"type": "INT",
"unsigned": false,
"values": [],
"zerofill": false
}
},
"indexes": {
"PRIMARY": {
"type": "primary",
"name": "PRIMARY",
"length": [
null
],
"columns": [
"dl_id"
]
}
},
"collation": "utf8mb4_unicode_ci",
"engine": "InnoDB"
}
]
}
}
Whitespace-only changes.
@@ -0,0 +1,28 @@
{
"1": {
"method": "addIndex",
"params": [
"nexus_support_requests",
{
"type": "fulltext",
"name": "r_title",
"columns": [
"r_title"
]
}
]
},
"2": {
"method": "addIndex",
"params": [
"nexus_support_replies",
{
"type": "fulltext",
"name": "reply_post",
"columns": [
"reply_post"
]
}
]
}
}
Loaded 100 of 7517 files, more files were not shown because too many files have changed in this diff. Show more