Version 4.1.19.4

This commit is contained in:
Neo committed 2025-12-19 05:42:01 -08:00
1 parent 2bd5025018
commit 0dc2aee5ed
312 files changed
+53730 -32118

No files matched your search

+185 -123
View File
@@ -115,61 +115,71 @@ class _Upgrade
'length' => 150,
'allow_null' => false
) );
\IPS\Db::i()->dropIndex( 'core_sys_cp_sessions', 'session_running_time' );
\IPS\Db::i()->addIndex( 'core_sys_cp_sessions', array(
'type' => 'key',
'name' => 'session_running_time',
'columns' => array( 'session_running_time' )
) );
\IPS\Db::i()->dropIndex( 'core_sys_cp_sessions', 'session_member_id' );
\IPS\Db::i()->addIndex( 'core_sys_cp_sessions', array(
'type' => 'key',
'name' => 'session_member_id',
'columns' => array( 'session_member_id' )
) );
\IPS\Db::i()->dropIndex( 'upgrade_history', 'upgrades' );
\IPS\Db::i()->addIndex( 'upgrade_history', array(
'type' => 'key',
'name' => 'upgrades',
'columns' => array( 'upgrade_app', 'upgrade_version_id' )
) );
\IPS\Db::i()->dropIndex( 'validating', 'lost_pass' );
\IPS\Db::i()->addIndex( 'validating', array(
'type' => 'key',
'name' => 'lost_pass',
'columns' => array( 'lost_pass' )
) );
\IPS\Db::i()->dropIndex( 'validating', 'coppa_user' );
\IPS\Db::i()->addIndex( 'validating', array(
'type' => 'key',
'name' => 'coppa_user',
'columns' => array( 'coppa_user' )
) );
\IPS\Db::i()->dropIndex( 'api_log', 'api_log_date' );
\IPS\Db::i()->addIndex( 'api_log', array(
'type' => 'key',
'name' => 'api_log_date',
'columns' => array( 'api_log_date' )
) );
\IPS\Db::i()->dropIndex( 'core_applications', 'app_directory' );
\IPS\Db::i()->addIndex( 'core_applications', array(
'type' => 'key',
'name' => 'app_directory',
'columns' => array( 'app_directory' )
) );
\IPS\Db::i()->dropIndex( 'bulk_mail', 'mail_start' );
\IPS\Db::i()->addIndex( 'bulk_mail', array(
'type' => 'key',
'name' => 'mail_start',
'columns' => array( 'mail_start' )
) );
\IPS\Db::i()->dropIndex( 'skin_collections', 'set_is_default' );
\IPS\Db::i()->addIndex( 'skin_collections', array(
'type' => 'key',
'name' => 'set_is_default',
'columns' => array( 'set_is_default' )
) );
\IPS\Db::i()->dropIndex( 'rc_classes', 'onoff' );
\IPS\Db::i()->addIndex( 'rc_classes', array(
'type' => 'key',
'name' => 'onoff',
@@ -189,13 +199,15 @@ class _Upgrade
{
\IPS\Db::i()->delete( 'task_manager', "task_id NOT IN(" . implode( ',', $tasks ) . ")" );
}
\IPS\Db::i()->dropIndex( 'task_manager', 'task_key' );
\IPS\Db::i()->addIndex( 'task_manager', array(
'type' => 'unique',
'name' => 'task_key',
'columns' => array( 'task_application', 'task_key' )
) );
\IPS\Db::i()->dropIndex( 'announcements', 'announce_end' );
\IPS\Db::i()->addIndex( 'announcements', array(
'type' => 'key',
'name' => 'announce_end',
@@ -211,50 +223,58 @@ class _Upgrade
'name' => 'daterange',
'columns' => array( 'event_approved', 'event_unix_from', 'event_unix_to' )
) );
\IPS\Db::i()->dropIndex( 'cal_calendars', 'cal_rss_export' );
\IPS\Db::i()->addIndex( 'cal_calendars', array(
'type' => 'key',
'name' => 'cal_rss_export',
'columns' => array( 'cal_rss_export' )
) );
}
\IPS\Db::i()->dropIndex( 'core_sys_conf_settings', 'conf_group' );
\IPS\Db::i()->addIndex( 'core_sys_conf_settings', array(
'type' => 'key',
'name' => 'conf_group',
'columns' => array( 'conf_group', 'conf_position', 'conf_title' )
) );
\IPS\Db::i()->dropIndex( 'core_uagent_groups', 'ugroup_title' );
\IPS\Db::i()->addIndex( 'core_uagent_groups', array(
'type' => 'key',
'name' => 'ugroup_title',
'columns' => array( 'ugroup_title' )
) );
\IPS\Db::i()->dropIndex( 'core_uagents', 'ordering' );
\IPS\Db::i()->addIndex( 'core_uagents', array(
'type' => 'key',
'name' => 'ordering',
'columns' => array( 'uagent_position', 'uagent_key' )
) );
\IPS\Db::i()->dropIndex( 'core_sys_conf_settings', 'conf_add_cache' );
\IPS\Db::i()->addIndex( 'core_sys_conf_settings', array(
'type' => 'key',
'name' => 'conf_add_cache',
'columns' => array( 'conf_add_cache' )
) );
\IPS\Db::i()->dropIndex( 'emoticons', 'emo_set' );
\IPS\Db::i()->addIndex( 'emoticons', array(
'type' => 'key',
'name' => 'emo_set',
'columns' => array( 'emo_set' )
) );
\IPS\Db::i()->dropIndex( 'skin_templates', 'template_set_id' );
\IPS\Db::i()->addIndex( 'skin_templates', array(
'type' => 'key',
'name' => 'template_set_id',
'columns' => array( 'template_set_id' )
) );
\IPS\Db::i()->dropIndex( 'skin_css', 'css_set_id' );
\IPS\Db::i()->addIndex( 'skin_css', array(
'type' => 'key',
'name' => 'css_set_id',
@@ -267,34 +287,42 @@ class _Upgrade
'name' => 'map_user',
'columns' => array( 'map_user_id', 'map_folder_id', 'map_last_topic_reply' )
) );
\IPS\Db::i()->addColumn( 'validating', array(
'name' => 'spam_flag',
'type' => 'tinyint',
'length' => 1,
'allow_null' => false,
'default' => 0
) );
if( !\IPS\Db::i()->checkForColumn( 'validating', 'spam_flag' ) )
{
\IPS\Db::i()->addColumn( 'validating', array(
'name' => 'spam_flag',
'type' => 'tinyint',
'length' => 1,
'allow_null' => false,
'default' => 0
) );
}
\IPS\Db::i()->dropIndex( 'validating', 'spam_flag' );
\IPS\Db::i()->addIndex( 'validating', array(
'type' => 'key',
'name' => 'spam_flag',
'columns' => array( 'spam_flag' )
) );
\IPS\Db::i()->dropIndex( 'validating', 'member_id' );
\IPS\Db::i()->addIndex( 'validating', array(
'type' => 'key',
'name' => 'member_id',
'columns' => array( 'member_id' )
) );
\IPS\Db::i()->addColumn( 'core_sys_lang', array(
'name' => 'lang_protected',
'type' => 'tinyint',
'length' => 1,
'allow_null' => false,
'default' => 0
) );
if( !\IPS\Db::i()->checkForColumn( 'core_sys_lang', 'lang_protected' ) )
{
\IPS\Db::i()->addColumn('core_sys_lang', array(
'name' => 'lang_protected',
'type' => 'tinyint',
'length' => 1,
'allow_null' => false,
'default' => 0
));
}
\IPS\Db::i()->createTable( array(
'name' => 'member_status_actions',
@@ -1385,61 +1413,82 @@ class _Upgrade
) );
\IPS\Db::i()->query( "INSERT INTO " . \IPS\Db::i()->prefix . "member_status_updates (status_member_id, status_date, status_content, status_replies, status_is_latest ) SELECT pp_member_id, pp_status_update, pp_status, 0, 1 FROM " . \IPS\Db::i()->prefix . "profile_portal WHERE LENGTH(pp_status) > 0" );
\IPS\Db::i()->addColumn( 'groups', array(
'name' => 'g_max_notifications',
'type' => 'mediumint',
'length' => 0,
'allow_null' => false,
'default' => 0
) );
\IPS\Db::i()->addColumn( 'groups', array(
'name' => 'g_max_bgimg_upload',
'type' => 'int',
'length' => 10,
'allow_null' => false,
'default' => 0
) );
\IPS\Db::i()->addColumn( 'rc_classes', array(
'name' => 'app',
'type' => 'varchar',
'length' => 32,
'allow_null' => false
) );
\IPS\Db::i()->addColumn( 'forums', array(
'name' => 'disable_sharelinks',
'type' => 'int',
'length' => 1,
'allow_null' => false,
'default' => 0
) );
\IPS\Db::i()->addColumn( 'forums', array(
'name' => 'deleted_posts',
'type' => 'int',
'length' => 10,
'allow_null' => false,
'default' => 0
) );
\IPS\Db::i()->addColumn( 'forums', array(
'name' => 'deleted_topics',
'type' => 'int',
'length' => 10,
'allow_null' => false,
'default' => 0
) );
\IPS\Db::i()->addColumn( 'forums', array(
'name' => 'rules_raw_html',
'type' => 'tinyint',
'length' => 1,
'allow_null' => false,
'default' => 0
) );
if( !\IPS\Db::i()->checkForColumn( 'groups', 'g_max_notifications' ) )
{
\IPS\Db::i()->addColumn('groups', array(
'name' => 'g_max_notifications',
'type' => 'mediumint',
'length' => 0,
'allow_null' => false,
'default' => 0
));
}
if( !\IPS\Db::i()->checkForColumn( 'groups', 'g_max_bgimg_upload' ) )
{
\IPS\Db::i()->addColumn('groups', array(
'name' => 'g_max_bgimg_upload',
'type' => 'int',
'length' => 10,
'allow_null' => false,
'default' => 0
));
}
if( !\IPS\Db::i()->checkForColumn( 'rc_classes', 'app' ) )
{
\IPS\Db::i()->addColumn('rc_classes', array(
'name' => 'app',
'type' => 'varchar',
'length' => 32,
'allow_null' => false
));
}
if( !\IPS\Db::i()->checkForColumn( 'forums', 'disable_sharelinks' ) )
{
\IPS\Db::i()->addColumn('forums', array(
'name' => 'disable_sharelinks',
'type' => 'int',
'length' => 1,
'allow_null' => false,
'default' => 0
));
}
if( !\IPS\Db::i()->checkForColumn( 'forums', 'deleted_posts' ) )
{
\IPS\Db::i()->addColumn('forums', array(
'name' => 'deleted_posts',
'type' => 'int',
'length' => 10,
'allow_null' => false,
'default' => 0
));
}
if( !\IPS\Db::i()->checkForColumn( 'forums', 'deleted_topics' ) )
{
\IPS\Db::i()->addColumn('forums', array(
'name' => 'deleted_topics',
'type' => 'int',
'length' => 10,
'allow_null' => false,
'default' => 0
));
}
if( !\IPS\Db::i()->checkForColumn( 'forums', 'rules_raw_html' ) )
{
\IPS\Db::i()->addColumn('forums', array(
'name' => 'rules_raw_html',
'type' => 'tinyint',
'length' => 1,
'allow_null' => false,
'default' => 0
));
}
\IPS\Db::i()->update( 'rc_classes', array( 'app' => 'core' ), array( 'my_class=?', 'default' ) );
\IPS\Db::i()->update( 'rc_classes', array( 'app' => 'forums' ), array( 'my_class=?', 'post' ) );
@@ -1473,21 +1522,26 @@ class _Upgrade
'default' => null
) );
}
\IPS\Db::i()->addColumn( 'skin_templates', array(
'name' => 'template_master_key',
'type' => 'varchar',
'length' => 100,
'allow_null' => false,
'default' => ''
) );
if( !\IPS\Db::i()->checkForColumn( 'skin_templates', 'template_master_key' ) )
{
\IPS\Db::i()->addColumn('skin_templates', array(
'name' => 'template_master_key',
'type' => 'varchar',
'length' => 100,
'allow_null' => false,
'default' => ''
));
}
\IPS\Db::i()->dropIndex( 'skin_templates', 'template_master_key' );
\IPS\Db::i()->addIndex( 'skin_templates', array(
'type' => 'key',
'name' => 'template_master_key',
'columns' => array( 'template_master_key' )
) );
\IPS\Db::i()->dropIndex( 'skin_css', 'css_master_key' );
\IPS\Db::i()->addColumn( 'skin_css', array(
'name' => 'css_master_key',
'type' => 'varchar',
@@ -1495,7 +1549,8 @@ class _Upgrade
'allow_null' => false,
'default' => ''
) );
\IPS\Db::i()->dropIndex( 'skin_collections', 'set_master_key' );
\IPS\Db::i()->addColumn( 'skin_collections', array(
'name' => 'set_master_key',
'type' => 'varchar',
@@ -1503,33 +1558,40 @@ class _Upgrade
'allow_null' => false,
'default' => ''
) );
/* @note Here we previously performed some further updates on skins that are no longer relevant */
\IPS\Db::i()->addColumn( 'skin_collections', array(
'name' => 'set_order',
'type' => 'int',
'length' => 10,
'allow_null' => false,
'default' => 0
) );
if( !\IPS\Db::i()->checkForColumn( 'skin_collections', 'set_order' ) )
{
\IPS\Db::i()->addColumn('skin_collections', array(
'name' => 'set_order',
'type' => 'int',
'length' => 10,
'allow_null' => false,
'default' => 0
));
}
\IPS\Db::i()->dropIndex( 'skin_collections', 'set_order' );
\IPS\Db::i()->addIndex( 'skin_collections', array(
'type' => 'key',
'name' => 'set_order',
'columns' => array( 'set_order' )
) );
\IPS\Db::i()->addColumn( 'skin_replacements', array(
'name' => 'replacement_master_key',
'type' => 'varchar',
'length' => 100,
'allow_null' => false,
'default' => ''
) );
if( !\IPS\Db::i()->checkForColumn( 'skin_replacements', 'replacement_master_key' ) )
{
\IPS\Db::i()->addColumn('skin_replacements', array(
'name' => 'replacement_master_key',
'type' => 'varchar',
'length' => 100,
'allow_null' => false,
'default' => ''
));
}
\IPS\Db::i()->update( 'skin_replacements', array( 'replacement_master_key' => 'root' ), array( 'replacement_set_id=?', 0 ) );
\IPS\Db::i()->dropIndex( 'skin_templates', 'template_name' );
\IPS\Db::i()->addIndex( 'skin_templates', array(
'type' => 'key',
'name' => 'template_name',