Version 4.3.0

This commit is contained in:
Neo committed 2025-12-19 05:47:12 -08:00
1 parent 96997ddd8e
commit fe1acf984a
1349 files changed
+116159 -67711

No files matched your search

@@ -46,6 +46,13 @@ class _Upgrade
'query' => "ALTER TABLE " . \IPS\Db::i()->prefix . "core_members CHANGE misc conv_password_extra VARCHAR(255) null default null;"
);
}
else if ( \IPS\Db::i()->checkForColumn( 'core_members', 'conv_password_extra' ) )
{
$queries[] = array(
'table' => 'core_members',
'query' => "ALTER TABLE " . \IPS\Db::i()->prefix . "core_members CHANGE conv_password_extra conv_password_extra VARCHAR(255) null default null;"
);
}
else
{
$queries[] = array(
@@ -27,6 +27,8 @@ class _Upgrade
'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 foreign_id,
ADD INDEX foreign_id (foreign_id(191)),
DROP INDEX ipb_id,
DROP INDEX `type`,
ADD INDEX `type` (`type`),
@@ -36,6 +38,8 @@ class _Upgrade
'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 foreign_id,
ADD INDEX foreign_id (foreign_id(191)),
DROP INDEX ipb_id,
DROP INDEX `type`,
ADD INDEX `type` (`type`),
@@ -45,6 +49,8 @@ class _Upgrade
'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 foreign_id,
ADD INDEX foreign_id (foreign_id(191)),
DROP INDEX ipb_id,
DROP INDEX `type`,
ADD INDEX `type` (`type`),
@@ -55,7 +61,7 @@ class _Upgrade
'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)),
ADD INDEX foreign_id (foreign_id(191)),
DROP INDEX ipb_id,
DROP INDEX `type`,
ADD INDEX `type` (`type`),
+404 -401
View File
@@ -22,414 +22,417 @@ class _Upgrade
*/
public function step1()
{
if ( \IPS\Db::i()->checkForTable( 'custom_bbcode' ) )
if ( !\IPS\Db::i()->checkForTable( 'convert_custom_bbcode' ) )
{
\IPS\Db::i()->renameTable( 'custom_bbcode', 'convert_custom_bbcode' );
}
else
{
\IPS\Db::i()->createTable( array (
'name' => 'convert_custom_bbcode',
'columns' => array(
'bbcode_id' => array(
'allow_null' => false,
'auto_increment' => true,
'binary' => false,
'comment' => '',
'decimals' => NULL,
'default' => NULL,
'length' => 10,
'name' => 'bbcode_id',
'type' => 'INT',
'unsigned' => false,
'values' => array(),
'zerofill' => false,
if ( \IPS\Db::i()->checkForTable( 'custom_bbcode' ) )
{
\IPS\Db::i()->renameTable( 'custom_bbcode', 'convert_custom_bbcode' );
}
else
{
\IPS\Db::i()->createTable( array (
'name' => 'convert_custom_bbcode',
'columns' => array(
'bbcode_id' => array(
'allow_null' => false,
'auto_increment' => true,
'binary' => false,
'comment' => '',
'decimals' => NULL,
'default' => NULL,
'length' => 10,
'name' => 'bbcode_id',
'type' => 'INT',
'unsigned' => false,
'values' => array(),
'zerofill' => false,
),
'bbcode_title' => array(
'allow_null' => false,
'auto_increment' => false,
'binary' => false,
'comment' => '',
'decimals' => NULL,
'default' => '',
'length' => 255,
'name' => 'bbcode_title',
'type' => 'VARCHAR',
'unsigned' => false,
'values' => array (),
'zerofill' => false,
),
'bbcode_desc' => array(
'allow_null' => true,
'auto_increment' => false,
'binary' => false,
'comment' => '',
'decimals' => NULL,
'default' => NULL,
'length' => 0,
'name' => 'bbcode_desc',
'type' => 'TEXT',
'unsigned' => false,
'values' => array(),
'zerofill' => false,
),
'bbcode_tag' => array(
'allow_null' => false,
'auto_increment' => false,
'binary' => false,
'comment' => '',
'decimals' => NULL,
'default' => '',
'length' => 255,
'name' => 'bbcode_tag',
'type' => 'VARCHAR',
'unsigned' => false,
'values' => array(),
'zerofill' => false,
),
'bbcode_replace' => array(
'allow_null' => true,
'auto_increment' => false,
'binary' => false,
'comment' => '',
'decimals' => NULL,
'default' => NULL,
'length' => 0,
'name' => 'bbcode_replace',
'type' => 'TEXT',
'unsigned' => false,
'values' => array(),
'zerofill' => false,
),
'bbcode_useoption' => array(
'allow_null' => false,
'auto_increment' => false,
'binary' => false,
'comment' => '',
'decimals' => NULL,
'default' => '0',
'length' => 1,
'name' => 'bbcode_useoption',
'type' => 'TINYINT',
'unsigned' => false,
'values' => array(),
'zerofill' => false,
),
'bbcode_example' => array(
'allow_null' => true,
'auto_increment' => false,
'binary' => false,
'comment' => '',
'decimals' => NULL,
'default' => NULL,
'length' => 0,
'name' => 'bbcode_example',
'type' => 'TEXT',
'unsigned' => false,
'values' => array(),
'zerofill' => false,
),
'bbcode_switch_option' => array(
'allow_null' => false,
'auto_increment' => false,
'binary' => false,
'comment' => '',
'decimals' => NULL,
'default' => '0',
'length' => 1,
'name' => 'bbcode_switch_option',
'type' => 'INT',
'unsigned' => false,
'values' => array(),
'zerofill' => false,
),
'bbcode_menu_option_text' => array(
'allow_null' => false,
'auto_increment' => false,
'binary' => false,
'comment' => '',
'decimals' => NULL,
'default' => '',
'length' => 200,
'name' => 'bbcode_menu_option_text',
'type' => 'VARCHAR',
'unsigned' => false,
'values' => array(),
'zerofill' => false,
),
'bbcode_menu_content_text' => array(
'allow_null' => false,
'auto_increment' => false,
'binary' => false,
'comment' => '',
'decimals' => NULL,
'default' => '',
'length' => 200,
'name' => 'bbcode_menu_content_text',
'type' => 'VARCHAR',
'unsigned' => false,
'values' => array(),
'zerofill' => false,
),
'bbcode_single_tag' => array(
'allow_null' => false,
'auto_increment' => false,
'binary' => false,
'comment' => '',
'decimals' => NULL,
'default' => '0',
'length' => 1,
'name' => 'bbcode_single_tag',
'type' => 'TINYINT',
'unsigned' => false,
'values' => array(),
'zerofill' => false,
),
'bbcode_groups' => array(
'allow_null' => true,
'auto_increment' => false,
'binary' => false,
'comment' => '',
'decimals' => NULL,
'default' => NULL,
'length' => 255,
'name' => 'bbcode_groups',
'type' => 'VARCHAR',
'unsigned' => false,
'values' => array(),
'zerofill' => false,
),
'bbcode_sections' => array(
'allow_null' => true,
'auto_increment' => false,
'binary' => false,
'comment' => '',
'decimals' => NULL,
'default' => NULL,
'length' => 255,
'name' => 'bbcode_sections',
'type' => 'VARCHAR',
'unsigned' => false,
'values' => array(),
'zerofill' => false,
),
'bbcode_php_plugin' => array(
'allow_null' => true,
'auto_increment' => false,
'binary' => false,
'comment' => '',
'decimals' => NULL,
'default' => NULL,
'length' => 255,
'name' => 'bbcode_php_plugin',
'type' => 'VARCHAR',
'unsigned' => false,
'values' => array(),
'zerofill' => false,
),
'bbcode_no_parsing' => array(
'allow_null' => false,
'auto_increment' => false,
'binary' => false,
'comment' => '',
'decimals' => NULL,
'default' => '0',
'length' => 1,
'name' => 'bbcode_no_parsing',
'type' => 'TINYINT',
'unsigned' => false,
'values' => array(),
'zerofill' => false,
),
'bbcode_protected' => array(
'allow_null' => false,
'auto_increment' => false,
'binary' => false,
'comment' => '',
'decimals' => NULL,
'default' => '0',
'length' => 1,
'name' => 'bbcode_protected',
'type' => 'TINYINT',
'unsigned' => false,
'values' => array(),
'zerofill' => false,
),
'bbcode_aliases' => array(
'allow_null' => true,
'auto_increment' => false,
'binary' => false,
'comment' => '',
'decimals' => NULL,
'default' => NULL,
'length' => 255,
'name' => 'bbcode_aliases',
'type' => 'VARCHAR',
'unsigned' => false,
'values' => array(),
'zerofill' => false,
),
'bbcode_optional_option' => array(
'allow_null' => false,
'auto_increment' => false,
'binary' => false,
'comment' => '',
'decimals' => NULL,
'default' => '0',
'length' => 1,
'name' => 'bbcode_optional_option',
'type' => 'TINYINT',
'unsigned' => false,
'values' => array (),
'zerofill' => false,
),
'bbcode_image' => array(
'allow_null' => true,
'auto_increment' => false,
'binary' => false,
'comment' => '',
'decimals' => NULL,
'default' => NULL,
'length' => 255,
'name' => 'bbcode_image',
'type' => 'VARCHAR',
'unsigned' => false,
'values' => array(),
'zerofill' => false,
),
'bbcode_app' => array(
'allow_null' => false,
'auto_increment' => false,
'binary' => false,
'comment' => '',
'decimals' => NULL,
'default' => '',
'length' => 50,
'name' => 'bbcode_app',
'type' => 'VARCHAR',
'unsigned' => false,
'values' => array(),
'zerofill' => false,
),
'bbcode_custom_regex' => array(
'allow_null' => true,
'auto_increment' => false,
'binary' => false,
'comment' => '',
'decimals' => NULL,
'default' => NULL,
'length' => 0,
'name' => 'bbcode_custom_regex',
'type' => 'TEXT',
'unsigned' => false,
'values' => array(),
'zerofill' => false,
),
),
'bbcode_title' => array(
'allow_null' => false,
'auto_increment' => false,
'binary' => false,
'comment' => '',
'decimals' => NULL,
'default' => '',
'length' => 255,
'name' => 'bbcode_title',
'type' => 'VARCHAR',
'unsigned' => false,
'values' => array (),
'zerofill' => false,
),
'bbcode_desc' => array(
'allow_null' => true,
'auto_increment' => false,
'binary' => false,
'comment' => '',
'decimals' => NULL,
'default' => NULL,
'length' => 0,
'name' => 'bbcode_desc',
'type' => 'TEXT',
'unsigned' => false,
'values' => array(),
'zerofill' => false,
),
'bbcode_tag' => array(
'allow_null' => false,
'auto_increment' => false,
'binary' => false,
'comment' => '',
'decimals' => NULL,
'default' => '',
'length' => 255,
'name' => 'bbcode_tag',
'type' => 'VARCHAR',
'unsigned' => false,
'values' => array(),
'zerofill' => false,
),
'bbcode_replace' => array(
'allow_null' => true,
'auto_increment' => false,
'binary' => false,
'comment' => '',
'decimals' => NULL,
'default' => NULL,
'length' => 0,
'name' => 'bbcode_replace',
'type' => 'TEXT',
'unsigned' => false,
'values' => array(),
'zerofill' => false,
),
'bbcode_useoption' => array(
'allow_null' => false,
'auto_increment' => false,
'binary' => false,
'comment' => '',
'decimals' => NULL,
'default' => '0',
'length' => 1,
'name' => 'bbcode_useoption',
'type' => 'TINYINT',
'unsigned' => false,
'values' => array(),
'zerofill' => false,
),
'bbcode_example' => array(
'allow_null' => true,
'auto_increment' => false,
'binary' => false,
'comment' => '',
'decimals' => NULL,
'default' => NULL,
'length' => 0,
'name' => 'bbcode_example',
'type' => 'TEXT',
'unsigned' => false,
'values' => array(),
'zerofill' => false,
),
'bbcode_switch_option' => array(
'allow_null' => false,
'auto_increment' => false,
'binary' => false,
'comment' => '',
'decimals' => NULL,
'default' => '0',
'length' => 1,
'name' => 'bbcode_switch_option',
'type' => 'INT',
'unsigned' => false,
'values' => array(),
'zerofill' => false,
),
'bbcode_menu_option_text' => array(
'allow_null' => false,
'auto_increment' => false,
'binary' => false,
'comment' => '',
'decimals' => NULL,
'default' => '',
'length' => 200,
'name' => 'bbcode_menu_option_text',
'type' => 'VARCHAR',
'unsigned' => false,
'values' => array(),
'zerofill' => false,
),
'bbcode_menu_content_text' => array(
'allow_null' => false,
'auto_increment' => false,
'binary' => false,
'comment' => '',
'decimals' => NULL,
'default' => '',
'length' => 200,
'name' => 'bbcode_menu_content_text',
'type' => 'VARCHAR',
'unsigned' => false,
'values' => array(),
'zerofill' => false,
),
'bbcode_single_tag' => array(
'allow_null' => false,
'auto_increment' => false,
'binary' => false,
'comment' => '',
'decimals' => NULL,
'default' => '0',
'length' => 1,
'name' => 'bbcode_single_tag',
'type' => 'TINYINT',
'unsigned' => false,
'values' => array(),
'zerofill' => false,
),
'bbcode_groups' => array(
'allow_null' => true,
'auto_increment' => false,
'binary' => false,
'comment' => '',
'decimals' => NULL,
'default' => NULL,
'length' => 255,
'name' => 'bbcode_groups',
'type' => 'VARCHAR',
'unsigned' => false,
'values' => array(),
'zerofill' => false,
),
'bbcode_sections' => array(
'allow_null' => true,
'auto_increment' => false,
'binary' => false,
'comment' => '',
'decimals' => NULL,
'default' => NULL,
'length' => 255,
'name' => 'bbcode_sections',
'type' => 'VARCHAR',
'unsigned' => false,
'values' => array(),
'zerofill' => false,
),
'bbcode_php_plugin' => array(
'allow_null' => true,
'auto_increment' => false,
'binary' => false,
'comment' => '',
'decimals' => NULL,
'default' => NULL,
'length' => 255,
'name' => 'bbcode_php_plugin',
'type' => 'VARCHAR',
'unsigned' => false,
'values' => array(),
'zerofill' => false,
),
'bbcode_no_parsing' => array(
'allow_null' => false,
'auto_increment' => false,
'binary' => false,
'comment' => '',
'decimals' => NULL,
'default' => '0',
'length' => 1,
'name' => 'bbcode_no_parsing',
'type' => 'TINYINT',
'unsigned' => false,
'values' => array(),
'zerofill' => false,
),
'bbcode_protected' => array(
'allow_null' => false,
'auto_increment' => false,
'binary' => false,
'comment' => '',
'decimals' => NULL,
'default' => '0',
'length' => 1,
'name' => 'bbcode_protected',
'type' => 'TINYINT',
'unsigned' => false,
'values' => array(),
'zerofill' => false,
),
'bbcode_aliases' => array(
'allow_null' => true,
'auto_increment' => false,
'binary' => false,
'comment' => '',
'decimals' => NULL,
'default' => NULL,
'length' => 255,
'name' => 'bbcode_aliases',
'type' => 'VARCHAR',
'unsigned' => false,
'values' => array(),
'zerofill' => false,
),
'bbcode_optional_option' => array(
'allow_null' => false,
'auto_increment' => false,
'binary' => false,
'comment' => '',
'decimals' => NULL,
'default' => '0',
'length' => 1,
'name' => 'bbcode_optional_option',
'type' => 'TINYINT',
'unsigned' => false,
'values' => array (),
'zerofill' => false,
),
'bbcode_image' => array(
'allow_null' => true,
'auto_increment' => false,
'binary' => false,
'comment' => '',
'decimals' => NULL,
'default' => NULL,
'length' => 255,
'name' => 'bbcode_image',
'type' => 'VARCHAR',
'unsigned' => false,
'values' => array(),
'zerofill' => false,
),
'bbcode_app' => array(
'allow_null' => false,
'auto_increment' => false,
'binary' => false,
'comment' => '',
'decimals' => NULL,
'default' => '',
'length' => 50,
'name' => 'bbcode_app',
'type' => 'VARCHAR',
'unsigned' => false,
'values' => array(),
'zerofill' => false,
),
'bbcode_custom_regex' => array(
'allow_null' => true,
'auto_increment' => false,
'binary' => false,
'comment' => '',
'decimals' => NULL,
'default' => NULL,
'length' => 0,
'name' => 'bbcode_custom_regex',
'type' => 'TEXT',
'unsigned' => false,
'values' => array(),
'zerofill' => false,
),
),
'indexes' => array(
'PRIMARY' => array(
'type' => 'primary',
'name' => 'PRIMARY',
'length' => array( 0 => NULL ),
'columns' => array( 0 => 'bbcode_id' ),
),
)
) );
'indexes' => array(
'PRIMARY' => array(
'type' => 'primary',
'name' => 'PRIMARY',
'length' => array( 0 => NULL ),
'columns' => array( 0 => 'bbcode_id' ),
),
)
) );
}
}
if ( \IPS\Db::i()->checkForTable( 'bbcode_mediatag' ) )
if ( !\IPS\Db::i()->checkForTable( 'convert_bbcode_mediatag' ) )
{
\IPS\Db::i()->renameTable( 'bbcode_mediatag', 'convert_bbcode_mediatag' );
}
else
{
\IPS\Db::i()->createTable( array(
'name' => 'convert_bbcode_mediatag',
'columns' => array(
'mediatag_id' => array(
'allow_null' => false,
'auto_increment' => true,
'binary' => false,
'comment' => '',
'decimals' => NULL,
'default' => NULL,
'length' => 10,
'name' => 'mediatag_id',
'type' => 'SMALLINT',
'unsigned' => true,
'values' => array(),
'zerofill' => false,
if ( \IPS\Db::i()->checkForTable( 'bbcode_mediatag' ) )
{
\IPS\Db::i()->renameTable( 'bbcode_mediatag', 'convert_bbcode_mediatag' );
}
else
{
\IPS\Db::i()->createTable( array(
'name' => 'convert_bbcode_mediatag',
'columns' => array(
'mediatag_id' => array(
'allow_null' => false,
'auto_increment' => true,
'binary' => false,
'comment' => '',
'decimals' => NULL,
'default' => NULL,
'length' => 10,
'name' => 'mediatag_id',
'type' => 'SMALLINT',
'unsigned' => true,
'values' => array(),
'zerofill' => false,
),
'mediatag_name' => array(
'allow_null' => false,
'auto_increment' => false,
'binary' => false,
'comment' => '',
'decimals' => NULL,
'default' => '',
'length' => 255,
'name' => 'mediatag_name',
'type' => 'VARCHAR',
'unsigned' => false,
'values' => array(),
'zerofill' => false,
),
'mediatag_match' => array(
'allow_null' => true,
'auto_increment' => false,
'binary' => false,
'comment' => '',
'decimals' => NULL,
'default' => NULL,
'length' => 0,
'name' => 'mediatag_match',
'type' => 'TEXT',
'unsigned' => false,
'values' => array(),
'zerofill' => false,
),
'mediatag_replace' => array(
'allow_null' => true,
'auto_increment' => false,
'binary' => false,
'comment' => '',
'decimals' => NULL,
'default' => NULL,
'length' => 0,
'name' => 'mediatag_replace',
'type' => 'TEXT',
'unsigned' => false,
'values' => array(),
'zerofill' => false,
),
'mediatag_position' => array(
'allow_null' => false,
'auto_increment' => false,
'binary' => false,
'comment' => '',
'decimals' => NULL,
'default' => '0',
'length' => 6,
'name' => 'mediatag_position',
'type' => 'SMALLINT',
'unsigned' => false,
'values' => array(),
'zerofill' => false,
),
),
'mediatag_name' => array(
'allow_null' => false,
'auto_increment' => false,
'binary' => false,
'comment' => '',
'decimals' => NULL,
'default' => '',
'length' => 255,
'name' => 'mediatag_name',
'type' => 'VARCHAR',
'unsigned' => false,
'values' => array(),
'zerofill' => false,
),
'mediatag_match' => array(
'allow_null' => true,
'auto_increment' => false,
'binary' => false,
'comment' => '',
'decimals' => NULL,
'default' => NULL,
'length' => 0,
'name' => 'mediatag_match',
'type' => 'TEXT',
'unsigned' => false,
'values' => array(),
'zerofill' => false,
),
'mediatag_replace' => array(
'allow_null' => true,
'auto_increment' => false,
'binary' => false,
'comment' => '',
'decimals' => NULL,
'default' => NULL,
'length' => 0,
'name' => 'mediatag_replace',
'type' => 'TEXT',
'unsigned' => false,
'values' => array(),
'zerofill' => false,
),
'mediatag_position' => array(
'allow_null' => false,
'auto_increment' => false,
'binary' => false,
'comment' => '',
'decimals' => NULL,
'default' => '0',
'length' => 6,
'name' => 'mediatag_position',
'type' => 'SMALLINT',
'unsigned' => false,
'values' => array(),
'zerofill' => false,
),
),
'indexes' => array(
'PRIMARY' => array(
'type' => 'primary',
'name' => 'PRIMARY',
'length' => array( 0 => NULL ),
'columns' => array( 0 => 'mediatag_id' ),
),
)
) );
'indexes' => array(
'PRIMARY' => array(
'type' => 'primary',
'name' => 'PRIMARY',
'length' => array( 0 => NULL ),
'columns' => array( 0 => 'mediatag_id' ),
),
)
) );
}
}
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
}
@@ -0,0 +1,31 @@
{
"1": {
"method": "addColumn",
"params": [
"convert_apps",
{
"name": "finished",
"type": "BIT",
"length": 1,
"decimals": null,
"values": null,
"allow_null": true,
"default": "0",
"comment": "Has app been finished?",
"unsigned": false,
"zerofill": false,
"auto_increment": false,
"binary": false
}
]
},
"2": {
"method": "update",
"params": [
"convert_apps",
{
"finished": true
}
]
}
}
@@ -0,0 +1,15 @@
{
"1": {
"method": "update",
"params": [
"core_applications",
{
"app_enabled": 1
},
[
"app_directory=?",
"convert"
]
]
}
}
@@ -0,0 +1,41 @@
<?php
/**
* @brief 4.3.0 Beta 1 Upgrade Code
* @author <a href='https://www.invisioncommunity.com'>Invision Power Services, Inc.</a>
* @copyright (c) Invision Power Services, Inc.
* @license https://www.invisioncommunity.com/legal/standards/
* @package Invision Community
* @subpackage Converter
* @since 16 Oct 2017
*/
namespace IPS\convert\setup\upg_103000;
/* To prevent PHP errors (extending class does not exist) revealing path */
if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
{
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
exit;
}
/**
* 4.3.0 Beta 1 Upgrade Code
*/
class _Upgrade
{
/**
* Install new login handler
*
* @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()
{
/* Install new login handler */
\IPS\Application::load('convert')->installOther();
/* Remove legacy login handler */
\IPS\Db::i()->delete( 'core_login_handlers', array( 'login_key=?', 'Convert' ) );
return TRUE;
}
}