Version 4.2.0
This commit is contained in:
1 parent
0dc2aee5ed
commit
96997ddd8e
2074 files changed
+125454
-55780
No files matched your search
@@ -22,22 +22,46 @@ class _Upgrade
|
||||
*/
|
||||
public function step1()
|
||||
{
|
||||
$queries = array();
|
||||
|
||||
if ( \IPS\Db::i()->checkForColumn( 'core_members', 'conv_password' ) )
|
||||
{
|
||||
\IPS\Db::i()->changeColumn( 'core_members', 'conv_password', array( 'name' => 'conv_password', 'type' => 'VARCHAR', 'length' => 255, 'null' => TRUE, 'default' => NULL ) );
|
||||
$queries[] = array(
|
||||
'table' => 'core_members',
|
||||
'query' => "ALTER TABLE " . \IPS\Db::i()->prefix . "core_members CHANGE conv_password conv_password VARCHAR(255) null default null;"
|
||||
);
|
||||
}
|
||||
else
|
||||
{
|
||||
\IPS\Db::i()->addColumn( 'core_members', array( 'name' => 'conv_password', 'type' => 'VARCHAR', 'length' => 255, 'null' => TRUE, 'default' => NULL ) );
|
||||
$queries[] = array(
|
||||
'table' => 'core_members',
|
||||
'query' => "ALTER TABLE " . \IPS\Db::i()->prefix . "core_members ADD COLUMN conv_password VARCHAR(255) null default null;"
|
||||
);
|
||||
}
|
||||
|
||||
if ( \IPS\Db::i()->checkForColumn( 'core_members', 'misc' ) )
|
||||
{
|
||||
\IPS\Db::i()->changeColumn( 'core_members', 'misc', array( 'name' => 'conv_password_extra', 'type' => 'VARCHAR', 'length' => 255, 'null' => TRUE, 'default' => NULL ) );
|
||||
$queries[] = array(
|
||||
'table' => 'core_members',
|
||||
'query' => "ALTER TABLE " . \IPS\Db::i()->prefix . "core_members CHANGE misc conv_password_extra VARCHAR(255) null default null;"
|
||||
);
|
||||
}
|
||||
else
|
||||
{
|
||||
\IPS\Db::i()->addColumn( 'core_members', array( 'name' => 'conv_password_extra', 'type' => 'VARCHAR', 'length' => 255, 'null' => TRUE, 'default' => NULL ) );
|
||||
$queries[] = array(
|
||||
'table' => 'core_members',
|
||||
'query' => "ALTER TABLE " . \IPS\Db::i()->prefix . "core_members ADD conv_password_extra VARCHAR(255) null default null;"
|
||||
);
|
||||
}
|
||||
|
||||
$toRun = \IPS\core\Setup\Upgrade::runManualQueries( $queries );
|
||||
|
||||
if ( count( $toRun ) )
|
||||
{
|
||||
\IPS\core\Setup\Upgrade::adjustMultipleRedirect( array( 1 => 'convert', 'extra' => array( '_upgradeStep' => 2 ) ) );
|
||||
|
||||
/* Queries to run manually */
|
||||
return array( 'html' => \IPS\Theme::i()->getTemplate( 'forms' )->queries( $toRun, \IPS\Http\Url::internal( 'controller=upgrade' )->setQueryString( array( 'key' => $_SESSION['uniqueKey'], 'mr_continue' => 1, 'mr' => \IPS\Request::i()->mr ) ) ) );
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
|
||||
@@ -24,7 +24,7 @@ class _Upgrade
|
||||
{
|
||||
$queries = array();
|
||||
|
||||
/* This does not include all of the columns the IPS4 Converters use - only the ones set by the 3.x converters */
|
||||
/* This does not include all of the columns the 4.x Converters use - only the ones set by the 3.x converters */
|
||||
$old = array(
|
||||
'downloads' => array(
|
||||
array(
|
||||
|
||||
@@ -1,369 +0,0 @@
|
||||
{
|
||||
"1": {
|
||||
"method": "changeColumn",
|
||||
"params": [
|
||||
"convert_link_posts",
|
||||
"foreign_id",
|
||||
{
|
||||
"name": "foreign_id",
|
||||
"type": "VARCHAR",
|
||||
"length": 255,
|
||||
"decimals": null,
|
||||
"values": [],
|
||||
"allow_null": false,
|
||||
"default": "",
|
||||
"comment": "",
|
||||
"unsigned": false,
|
||||
"zerofill": false,
|
||||
"auto_increment": false,
|
||||
"binary": false
|
||||
}
|
||||
]
|
||||
},
|
||||
"2": {
|
||||
"method": "changeColumn",
|
||||
"params": [
|
||||
"convert_link_pms",
|
||||
"foreign_id",
|
||||
{
|
||||
"name": "foreign_id",
|
||||
"type": "VARCHAR",
|
||||
"length": 255,
|
||||
"decimals": null,
|
||||
"values": [],
|
||||
"allow_null": false,
|
||||
"default": "",
|
||||
"comment": "",
|
||||
"unsigned": false,
|
||||
"zerofill": false,
|
||||
"auto_increment": false,
|
||||
"binary": false
|
||||
}
|
||||
]
|
||||
},
|
||||
"3": {
|
||||
"method": "changeColumn",
|
||||
"params": [
|
||||
"convert_link_topics",
|
||||
"foreign_id",
|
||||
{
|
||||
"name": "foreign_id",
|
||||
"type": "VARCHAR",
|
||||
"length": 255,
|
||||
"decimals": null,
|
||||
"values": [],
|
||||
"allow_null": false,
|
||||
"default": "",
|
||||
"comment": "",
|
||||
"unsigned": false,
|
||||
"zerofill": false,
|
||||
"auto_increment": false,
|
||||
"binary": false
|
||||
}
|
||||
]
|
||||
},
|
||||
"4": {
|
||||
"method": "addIndex",
|
||||
"params": [
|
||||
"convert_link_posts",
|
||||
{
|
||||
"type": "key",
|
||||
"name": "local_lookup",
|
||||
"columns": [
|
||||
"ipb_id",
|
||||
"type",
|
||||
"app"
|
||||
],
|
||||
"length": [
|
||||
null,
|
||||
null,
|
||||
null
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"5": {
|
||||
"method": "changeIndex",
|
||||
"params": [
|
||||
"convert_link_posts",
|
||||
"ipb_id",
|
||||
{
|
||||
"type": "key",
|
||||
"name": "ipb_id",
|
||||
"columns": [
|
||||
"ipb_id"
|
||||
],
|
||||
"length": [
|
||||
null
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"6": {
|
||||
"method": "dropIndex",
|
||||
"params": [
|
||||
"convert_link_posts",
|
||||
"ipb_id"
|
||||
]
|
||||
},
|
||||
"7": {
|
||||
"method": "dropIndex",
|
||||
"params": [
|
||||
"convert_link_posts",
|
||||
"type"
|
||||
]
|
||||
},
|
||||
"8": {
|
||||
"method": "dropIndex",
|
||||
"params": [
|
||||
"convert_link_topics",
|
||||
"ipb_id"
|
||||
]
|
||||
},
|
||||
"9": {
|
||||
"method": "dropIndex",
|
||||
"params": [
|
||||
"convert_link_topics",
|
||||
"type"
|
||||
]
|
||||
},
|
||||
"10": {
|
||||
"method": "addIndex",
|
||||
"params": [
|
||||
"convert_link_topics",
|
||||
{
|
||||
"type": "key",
|
||||
"name": "local_lookup",
|
||||
"columns": [
|
||||
"ipb_id",
|
||||
"type",
|
||||
"app"
|
||||
],
|
||||
"length": [
|
||||
null,
|
||||
null,
|
||||
null
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"11": {
|
||||
"method": "dropIndex",
|
||||
"params": [
|
||||
"convert_link_pms",
|
||||
"ipb_id"
|
||||
]
|
||||
},
|
||||
"12": {
|
||||
"method": "dropIndex",
|
||||
"params": [
|
||||
"convert_link_pms",
|
||||
"type"
|
||||
]
|
||||
},
|
||||
"13": {
|
||||
"method": "addIndex",
|
||||
"params": [
|
||||
"convert_link_pms",
|
||||
{
|
||||
"type": "key",
|
||||
"name": "local_lookup",
|
||||
"columns": [
|
||||
"ipb_id",
|
||||
"type",
|
||||
"app"
|
||||
],
|
||||
"length": [
|
||||
null,
|
||||
null,
|
||||
null
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"14": {
|
||||
"method": "dropIndex",
|
||||
"params": [
|
||||
"convert_link",
|
||||
"foreign_id"
|
||||
]
|
||||
},
|
||||
"15": {
|
||||
"method": "dropIndex",
|
||||
"params": [
|
||||
"convert_link",
|
||||
"ipb_id"
|
||||
]
|
||||
},
|
||||
"16": {
|
||||
"method": "dropIndex",
|
||||
"params": [
|
||||
"convert_link",
|
||||
"type"
|
||||
]
|
||||
},
|
||||
"17": {
|
||||
"method": "addIndex",
|
||||
"params": [
|
||||
"convert_link",
|
||||
{
|
||||
"type": "key",
|
||||
"name": "foreign_id",
|
||||
"columns": [
|
||||
"foreign_id"
|
||||
],
|
||||
"length": [
|
||||
250
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"18": {
|
||||
"method": "addIndex",
|
||||
"params": [
|
||||
"convert_link",
|
||||
{
|
||||
"type": "key",
|
||||
"name": "local_lookup",
|
||||
"columns": [
|
||||
"ipb_id",
|
||||
"type",
|
||||
"app"
|
||||
],
|
||||
"length": [
|
||||
null,
|
||||
null,
|
||||
null
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"19": {
|
||||
"method": "addIndex",
|
||||
"params": [
|
||||
"convert_link",
|
||||
{
|
||||
"type": "key",
|
||||
"name": "type",
|
||||
"columns": [
|
||||
"type"
|
||||
],
|
||||
"length": [
|
||||
null
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"20": {
|
||||
"method": "addIndex",
|
||||
"params": [
|
||||
"convert_link",
|
||||
{
|
||||
"type": "key",
|
||||
"name": "app",
|
||||
"columns": [
|
||||
"app"
|
||||
],
|
||||
"length": [
|
||||
null
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"21": {
|
||||
"method": "addIndex",
|
||||
"params": [
|
||||
"convert_link_pms",
|
||||
{
|
||||
"type": "key",
|
||||
"name": "type",
|
||||
"columns": [
|
||||
"type"
|
||||
],
|
||||
"length": [
|
||||
null
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"22": {
|
||||
"method": "addIndex",
|
||||
"params": [
|
||||
"convert_link_pms",
|
||||
{
|
||||
"type": "key",
|
||||
"name": "app",
|
||||
"columns": [
|
||||
"app"
|
||||
],
|
||||
"length": [
|
||||
null
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"23": {
|
||||
"method": "addIndex",
|
||||
"params": [
|
||||
"convert_link_posts",
|
||||
{
|
||||
"type": "key",
|
||||
"name": "type",
|
||||
"columns": [
|
||||
"type"
|
||||
],
|
||||
"length": [
|
||||
null
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"24": {
|
||||
"method": "addIndex",
|
||||
"params": [
|
||||
"convert_link_posts",
|
||||
{
|
||||
"type": "key",
|
||||
"name": "app",
|
||||
"columns": [
|
||||
"app"
|
||||
],
|
||||
"length": [
|
||||
null
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"25": {
|
||||
"method": "addIndex",
|
||||
"params": [
|
||||
"convert_link_topics",
|
||||
{
|
||||
"type": "key",
|
||||
"name": "type",
|
||||
"columns": [
|
||||
"type"
|
||||
],
|
||||
"length": [
|
||||
null
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"26": {
|
||||
"method": "addIndex",
|
||||
"params": [
|
||||
"convert_link_topics",
|
||||
{
|
||||
"type": "key",
|
||||
"name": "app",
|
||||
"columns": [
|
||||
"app"
|
||||
],
|
||||
"length": [
|
||||
null
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,76 @@
|
||||
<?php
|
||||
|
||||
|
||||
namespace IPS\convert\setup\upg_101006;
|
||||
|
||||
/* To prevent PHP errors (extending class does not exist) revealing path */
|
||||
if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
{
|
||||
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
|
||||
exit;
|
||||
}
|
||||
|
||||
/**
|
||||
* 4.1.0 Upgrade Code
|
||||
*/
|
||||
class _Upgrade
|
||||
{
|
||||
/**
|
||||
* Adjust converter columns - we do it here to combine queries for efficiency
|
||||
*
|
||||
* @return array If returns TRUE, upgrader will proceed to next step. If it returns any other value, it will set this as the value of the 'extra' GET parameter and rerun this step (useful for loops)
|
||||
*/
|
||||
public function step1()
|
||||
{
|
||||
$toRun = \IPS\core\Setup\Upgrade::runManualQueries( array(
|
||||
array(
|
||||
'table' => 'convert_link_posts',
|
||||
'query' => "ALTER TABLE " . \IPS\Db::i()->prefix . "convert_link_posts CHANGE foreign_id foreign_id VARCHAR(255) NOT NULL DEFAULT '',
|
||||
ADD INDEX local_lookup(ipb_id,type,app),
|
||||
DROP INDEX ipb_id,
|
||||
DROP INDEX `type`,
|
||||
ADD INDEX `type` (`type`),
|
||||
ADD INDEX app (app)"
|
||||
),
|
||||
array(
|
||||
'table' => 'convert_link_pms',
|
||||
'query' => "ALTER TABLE " . \IPS\Db::i()->prefix . "convert_link_pms CHANGE foreign_id foreign_id VARCHAR(255) NOT NULL DEFAULT '',
|
||||
ADD INDEX local_lookup(ipb_id,type,app),
|
||||
DROP INDEX ipb_id,
|
||||
DROP INDEX `type`,
|
||||
ADD INDEX `type` (`type`),
|
||||
ADD INDEX app (app)"
|
||||
),
|
||||
array(
|
||||
'table' => 'convert_link_topics',
|
||||
'query' => "ALTER TABLE " . \IPS\Db::i()->prefix . "convert_link_topics CHANGE foreign_id foreign_id VARCHAR(255) NOT NULL DEFAULT '',
|
||||
ADD INDEX local_lookup(ipb_id,type,app),
|
||||
DROP INDEX ipb_id,
|
||||
DROP INDEX `type`,
|
||||
ADD INDEX `type` (`type`),
|
||||
ADD INDEX app (app)"
|
||||
),
|
||||
array(
|
||||
'table' => 'convert_link',
|
||||
'query' => "ALTER TABLE " . \IPS\Db::i()->prefix . "convert_link CHANGE foreign_id foreign_id VARCHAR(255) NOT NULL DEFAULT '',
|
||||
ADD INDEX local_lookup(ipb_id,type,app),
|
||||
DROP INDEX foreign_id,
|
||||
ADD INDEX foreign_id (foreign_id(250)),
|
||||
DROP INDEX ipb_id,
|
||||
DROP INDEX `type`,
|
||||
ADD INDEX `type` (`type`),
|
||||
ADD INDEX app (app)"
|
||||
)
|
||||
) );
|
||||
|
||||
if ( count( $toRun ) )
|
||||
{
|
||||
\IPS\core\Setup\Upgrade::adjustMultipleRedirect( array( 1 => 'convert', 'extra' => array( '_upgradeStep' => 2, '_upgradeData' => 0 ) ) );
|
||||
|
||||
/* Queries to run manually */
|
||||
return array( 'html' => \IPS\Theme::i()->getTemplate( 'forms' )->queries( $toRun, \IPS\Http\Url::internal( 'controller=upgrade' )->setQueryString( array( 'key' => $_SESSION['uniqueKey'], 'mr_continue' => 1, 'mr' => \IPS\Request::i()->mr ) ) ) );
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
@@ -1,12 +1,11 @@
|
||||
<?php
|
||||
/**
|
||||
* @brief Upgrader: Custom Post Upgrade Message
|
||||
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
|
||||
* @copyright (c) 2001 - 2016 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/legal/standards/
|
||||
* @package IPS Community Suite
|
||||
* @author <a href='https://www.invisioncommunity.com'>Invision Power Services, Inc.</a>
|
||||
* @copyright (c) Invision Power Services, Inc.
|
||||
* @license https://www.invisioncommunity.com/legal/standards/
|
||||
* @package Invision Community
|
||||
* @since 16 May 2016
|
||||
* @version SVN_VERSION_NUMBER
|
||||
*/
|
||||
|
||||
/* Check for the older style redirect scripts, and if present tell the admin to remove. */
|
||||
|
||||
@@ -1,13 +1,12 @@
|
||||
<?php
|
||||
/**
|
||||
* @brief 1.2.3 Upgrade Code
|
||||
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
|
||||
* @copyright (c) 2001 - 2016 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/legal/standards/
|
||||
* @package IPS Community Suite
|
||||
* @author <a href='https://www.invisioncommunity.com'>Invision Power Services, Inc.</a>
|
||||
* @copyright (c) Invision Power Services, Inc.
|
||||
* @license https://www.invisioncommunity.com/legal/standards/
|
||||
* @package Invision Community
|
||||
* @subpackage Converter
|
||||
* @since 01 Feb 2017
|
||||
* @version SVN_VERSION_NUMBER
|
||||
*/
|
||||
|
||||
namespace IPS\convert\setup\upg_33001;
|
||||
@@ -52,7 +51,7 @@ class _Upgrade
|
||||
),
|
||||
'ipb_id' => array(
|
||||
'allow_null' => false,
|
||||
'auto_increment' => true,
|
||||
'auto_increment' => false,
|
||||
'binary' => false,
|
||||
'comment' => '',
|
||||
'decimals' => NULL,
|
||||
@@ -66,7 +65,7 @@ class _Upgrade
|
||||
),
|
||||
'foreign_id' => array(
|
||||
'allow_null' => false,
|
||||
'auto_increment' => true,
|
||||
'auto_increment' => false,
|
||||
'binary' => false,
|
||||
'comment' => '',
|
||||
'decimals' => NULL,
|
||||
@@ -80,7 +79,7 @@ class _Upgrade
|
||||
),
|
||||
'type' => array(
|
||||
'allow_null' => true,
|
||||
'auto_increment' => true,
|
||||
'auto_increment' => false,
|
||||
'binary' => false,
|
||||
'comment' => '',
|
||||
'decimals' => NULL,
|
||||
@@ -94,7 +93,7 @@ class _Upgrade
|
||||
),
|
||||
'duplicate' => array(
|
||||
'allow_null' => false,
|
||||
'auto_increment' => true,
|
||||
'auto_increment' => false,
|
||||
'binary' => false,
|
||||
'comment' => '',
|
||||
'decimals' => NULL,
|
||||
@@ -108,7 +107,7 @@ class _Upgrade
|
||||
),
|
||||
'app' => array(
|
||||
'allow_null' => false,
|
||||
'auto_increment' => true,
|
||||
'auto_increment' => false,
|
||||
'binary' => false,
|
||||
'comment' => '',
|
||||
'decimals' => NULL,
|
||||
@@ -153,7 +152,7 @@ class _Upgrade
|
||||
),
|
||||
'ipb_id' => array(
|
||||
'allow_null' => false,
|
||||
'auto_increment' => true,
|
||||
'auto_increment' => false,
|
||||
'binary' => false,
|
||||
'comment' => '',
|
||||
'decimals' => NULL,
|
||||
@@ -167,7 +166,7 @@ class _Upgrade
|
||||
),
|
||||
'foreign_id' => array(
|
||||
'allow_null' => false,
|
||||
'auto_increment' => true,
|
||||
'auto_increment' => false,
|
||||
'binary' => false,
|
||||
'comment' => '',
|
||||
'decimals' => NULL,
|
||||
@@ -181,7 +180,7 @@ class _Upgrade
|
||||
),
|
||||
'type' => array(
|
||||
'allow_null' => true,
|
||||
'auto_increment' => true,
|
||||
'auto_increment' => false,
|
||||
'binary' => false,
|
||||
'comment' => '',
|
||||
'decimals' => NULL,
|
||||
@@ -195,7 +194,7 @@ class _Upgrade
|
||||
),
|
||||
'duplicate' => array(
|
||||
'allow_null' => false,
|
||||
'auto_increment' => true,
|
||||
'auto_increment' => false,
|
||||
'binary' => false,
|
||||
'comment' => '',
|
||||
'decimals' => NULL,
|
||||
@@ -209,7 +208,7 @@ class _Upgrade
|
||||
),
|
||||
'app' => array(
|
||||
'allow_null' => false,
|
||||
'auto_increment' => true,
|
||||
'auto_increment' => false,
|
||||
'binary' => false,
|
||||
'comment' => '',
|
||||
'decimals' => NULL,
|
||||
@@ -254,7 +253,7 @@ class _Upgrade
|
||||
),
|
||||
'ipb_id' => array(
|
||||
'allow_null' => false,
|
||||
'auto_increment' => true,
|
||||
'auto_increment' => false,
|
||||
'binary' => false,
|
||||
'comment' => '',
|
||||
'decimals' => NULL,
|
||||
@@ -268,7 +267,7 @@ class _Upgrade
|
||||
),
|
||||
'foreign_id' => array(
|
||||
'allow_null' => false,
|
||||
'auto_increment' => true,
|
||||
'auto_increment' => false,
|
||||
'binary' => false,
|
||||
'comment' => '',
|
||||
'decimals' => NULL,
|
||||
@@ -282,7 +281,7 @@ class _Upgrade
|
||||
),
|
||||
'type' => array(
|
||||
'allow_null' => true,
|
||||
'auto_increment' => true,
|
||||
'auto_increment' => false,
|
||||
'binary' => false,
|
||||
'comment' => '',
|
||||
'decimals' => NULL,
|
||||
@@ -296,7 +295,7 @@ class _Upgrade
|
||||
),
|
||||
'duplicate' => array(
|
||||
'allow_null' => false,
|
||||
'auto_increment' => true,
|
||||
'auto_increment' => false,
|
||||
'binary' => false,
|
||||
'comment' => '',
|
||||
'decimals' => NULL,
|
||||
@@ -310,7 +309,7 @@ class _Upgrade
|
||||
),
|
||||
'app' => array(
|
||||
'allow_null' => false,
|
||||
'auto_increment' => true,
|
||||
'auto_increment' => false,
|
||||
'binary' => false,
|
||||
'comment' => '',
|
||||
'decimals' => NULL,
|
||||
|
||||
Reference in new issue
Block a user