Version 4.2.0

This commit is contained in:
Neo committed 2025-12-19 05:44:59 -08:00
1 parent 0dc2aee5ed
commit 96997ddd8e
2074 files changed
+125454 -55780

No files matched your search

+20 -9
View File
@@ -2,9 +2,9 @@
/**
* @brief Converter Library CMS Class
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
* @copyright (c) 2001 - 2016 Invision Power Services, Inc.
* @package IPS Community Suite
* @author <a href='https://www.invisioncommunity.com'>Invision Power Services, Inc.</a>
* @copyright (c) Invision Power Services, Inc.
* @package Invision Community
* @subpackage Converter
* @since 21 Jan 2015
*/
@@ -219,14 +219,15 @@ class _Cms extends Core
{
$in[] = $database;
}
$return[ $k ] = array(
'step_title' => 'convert_cms_attachments',
'step_method' => 'convertAttachments',
'ips_rows' => \IPS\Db::i()->select( 'COUNT(*)', 'core_attachments_map', array( \IPS\Db::i()->in( 'id3', $in ) . " AND location_key=?", 'cms_Records' ) )->first(),
'source_rows' => $this->software->countRows( $v['table'], $v['where'] ),
'per_cycle' => 100,
'dependencies' => array( 'convertCmsDatabaseRecords', 'convertCmsDatabaseComments', 'convertCmsDatabaseReviews' ),
#'dependencies' => array( 'convertCmsDatabaseRecords', 'convertCmsDatabaseComments', 'convertCmsDatabaseReviews' ),
'dependencies' => array( 'convertCmsDatabaseRecords' ), //TODO dear code reviewer... please review this part.. i had to remove it for my further work
'link_type' => 'core_attachments',
);
break;
@@ -273,8 +274,12 @@ class _Cms extends Core
$database->delete();
}
}
return array();
/* Only return if we're truncating this step */
if( $method == 'convertCmsDatabases' )
{
return array();
}
break;
case 'convertCmsDatabaseCategories':
@@ -308,6 +313,12 @@ class _Cms extends Core
case 'convertCmsMedia':
$return['convertCmsMedia'] = array( 'cms_media' => NULL );
break;
case 'convertAttachments':
$subQuery = (string) \IPS\Db::i()->select( 'attachment_id', 'core_attachments_map', array( "location_key='cms_Records'" ) );
$return['convertAttachments'] = array( 'core_attachments' => "attach_id IN ( {$subQuery} )", 'core_attachments_map' => array( "location_key=?", 'cms_Records' ) );
break;
}
}
@@ -575,7 +586,7 @@ class _Cms extends Core
/**
* Convert a block
* @note These probably won't really work unless going from IPS4 to IPS4, but we still support them anyway so they can be refactored.
* @note These probably won't really work unless going from Invision Community to Invision Community, but we still support them anyway so they can be refactored.
*
* @param array $info Data to insert.
* @return integer|boolean The ID of the newly inserted block, or FALSE on failure.
@@ -2645,7 +2656,7 @@ class _Cms extends Core
$map['id1_from_parent'] = FALSE;
$map['id2_from_parent'] = FALSE;
$map['id3_skip_link'] = TRUE;
$map['location_key'] = "cms_Records{$database}";
$map['location_key'] = "cms_Records";
if ( \substr( $map['id3'], -1, 7 ) == '-review' )
{