Version 4.1.19

This commit is contained in:
Neo committed 2025-12-19 05:38:56 -08:00
1 parent 28bd025b35
commit 2bd5025018
2674 files changed
+233518 -77766

No files matched your search

+104 -101
View File
@@ -2,9 +2,9 @@
/**
* @brief Upgrade steps
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
* @copyright (c) 2001 - SVN_YYYY Invision Power Services, Inc.
* @copyright (c) 2001 - 2016 Invision Power Services, Inc.
* @license http://www.invisionpower.com/legal/standards/
* @package IPS Social Suite
* @package IPS Community Suite
* @since 27 May 2014
* @version SVN_VERSION_NUMBER
*/
@@ -30,111 +30,114 @@ class _Upgrade
*/
public function step1()
{
if( !\IPS\Db::i()->checkForColumn( 'tags_index', 'tag_hidden' ) )
if ( ! isset( \IPS\Request::i()->run_anyway ) )
{
\IPS\Db::i()->addColumn( 'tags_index', array(
'name' => 'tag_hidden',
'type' => 'int',
'length' => 1,
'allow_null' => false,
'default' => 0
) );
\IPS\Db::i()->addIndex( 'tags_index', array(
'type' => 'key',
'name' => 'tag_grab',
'columns' => array( 'app', 'type', 'type_id', 'type_2', 'type_id_2', 'tag_hidden' )
) );
}
\IPS\Db::i()->addIndex( 'message_topic_user_map', array(
'type' => 'key',
'name' => 'map_topic_id',
'columns' => array( 'map_topic_id' )
) );
if( !\IPS\Db::i()->checkForColumn( 'message_topic_user_map', 'map_last_topic_reply' ) )
{
\IPS\Db::i()->addColumn( 'message_topic_user_map', array(
'name' => 'map_last_topic_reply',
'type' => 'int',
'length' => 10,
'allow_null' => false,
'default' => 0
) );
}
\IPS\Db::i()->query( "UPDATE " . \IPS\Db::i()->prefix . "message_topic_user_map m, " . \IPS\Db::i()->prefix . "message_topics t SET m.map_last_topic_reply=t.mt_last_post_time WHERE m.map_topic_id=t.mt_id" );
\IPS\Db::i()->dropIndex( 'task_manager', 'task_next_run' );
\IPS\Db::i()->addIndex( 'task_manager', array(
'type' => 'key',
'name' => 'task_next_run',
'columns' => array( 'task_enabled', 'task_next_run' )
) );
\IPS\Db::i()->addIndex( 'captcha', array(
'type' => 'key',
'name' => 'captcha_date',
'columns' => array( 'captcha_date' )
) );
\IPS\Db::i()->addIndex( 'rss_import', array(
'type' => 'key',
'name' => 'rss_import_enabled',
'columns' => array( 'rss_import_enabled', 'rss_import_last_import' )
) );
\IPS\Db::i()->addIndex( 'core_sys_settings_titles', array(
'type' => 'key',
'name' => 'conf_title_keyword',
'columns' => array( 'conf_title_keyword' )
) );
\IPS\Db::i()->addIndex( 'core_sys_conf_settings', array(
'type' => 'key',
'name' => 'conf_key',
'columns' => array( 'conf_key' )
) );
\IPS\Db::i()->createTable( array(
'name' => 'core_rss_imported',
'columns' => array(
array(
'name' => 'rss_guid',
'type' => 'char',
'length' => 32,
if( !\IPS\Db::i()->checkForColumn( 'tags_index', 'tag_hidden' ) )
{
\IPS\Db::i()->addColumn( 'tags_index', array(
'name' => 'tag_hidden',
'type' => 'int',
'length' => 1,
'allow_null' => false,
),
array(
'name' => 'rss_foreign_id',
'default' => 0
) );
\IPS\Db::i()->addIndex( 'tags_index', array(
'type' => 'key',
'name' => 'tag_grab',
'columns' => array( 'app', 'type', 'type_id', 'type_2', 'type_id_2', 'tag_hidden' )
) );
}
\IPS\Db::i()->addIndex( 'message_topic_user_map', array(
'type' => 'key',
'name' => 'map_topic_id',
'columns' => array( 'map_topic_id' )
) );
if( !\IPS\Db::i()->checkForColumn( 'message_topic_user_map', 'map_last_topic_reply' ) )
{
\IPS\Db::i()->addColumn( 'message_topic_user_map', array(
'name' => 'map_last_topic_reply',
'type' => 'int',
'length' => 10,
'allow_null' => false,
'default' => 0
) );
}
\IPS\Db::i()->query( "UPDATE " . \IPS\Db::i()->prefix . "message_topic_user_map m, " . \IPS\Db::i()->prefix . "message_topics t SET m.map_last_topic_reply=t.mt_last_post_time WHERE m.map_topic_id=t.mt_id" );
\IPS\Db::i()->dropIndex( 'task_manager', 'task_next_run' );
\IPS\Db::i()->addIndex( 'task_manager', array(
'type' => 'key',
'name' => 'task_next_run',
'columns' => array( 'task_enabled', 'task_next_run' )
) );
\IPS\Db::i()->addIndex( 'captcha', array(
'type' => 'key',
'name' => 'captcha_date',
'columns' => array( 'captcha_date' )
) );
\IPS\Db::i()->addIndex( 'rss_import', array(
'type' => 'key',
'name' => 'rss_import_enabled',
'columns' => array( 'rss_import_enabled', 'rss_import_last_import' )
) );
\IPS\Db::i()->addIndex( 'core_sys_settings_titles', array(
'type' => 'key',
'name' => 'conf_title_keyword',
'columns' => array( 'conf_title_keyword' )
) );
\IPS\Db::i()->addIndex( 'core_sys_conf_settings', array(
'type' => 'key',
'name' => 'conf_key',
'columns' => array( 'conf_key' )
) );
\IPS\Db::i()->createTable( array(
'name' => 'core_rss_imported',
'columns' => array(
array(
'name' => 'rss_guid',
'type' => 'char',
'length' => 32,
'allow_null' => false,
),
array(
'name' => 'rss_foreign_id',
'type' => 'int',
'length' => 10,
'allow_null' => false,
'default' => 0
),
array(
'name' => 'rss_foreign_key',
'type' => 'varchar',
'length' => 100,
'allow_null' => false,
'default' => ''
)
),
array(
'name' => 'rss_foreign_key',
'type' => 'varchar',
'length' => 100,
'allow_null' => false,
'default' => ''
'indexes' => array(
array(
'type' => 'primary',
'columns' => array( 'rss_guid' )
),
array(
'type' => 'key',
'name' => 'rss_grabber',
'columns' => array( 'rss_guid', 'rss_foreign_key' )
),
)
),
'indexes' => array(
array(
'type' => 'primary',
'columns' => array( 'rss_guid' )
),
array(
'type' => 'key',
'name' => 'rss_grabber',
'columns' => array( 'rss_guid', 'rss_foreign_key' )
),
)
) );
) );
}
$toRun = \IPS\core\Setup\Upgrade::runManualQueries( array( array(
'table' => 'forum_tracker',
'query' => "ALTER TABLE " . \IPS\Db::i()->prefix . "forum_tracker CHANGE COLUMN member_id member_id MEDIUMINT(8) NOT NULL DEFAULT 0;"
@@ -152,10 +155,10 @@ class _Upgrade
if ( count( $toRun ) )
{
$mr = \IPS\core\Setup\Upgrade::adjustMultipleRedirect( array( 1 => 'core', 'extra' => array( '_upgradeStep' => 2 ) ) );
\IPS\core\Setup\Upgrade::adjustMultipleRedirect( array( 1 => 'core', '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' => $mr ) ) ) );
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 ) ) ) );
}
/* Finish */