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

+144 -14
View File
@@ -2,9 +2,9 @@
/**
* @brief Converter Library Blog 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
*/
@@ -52,7 +52,7 @@ class _Blog extends Core
'dependencies' => array(),
'link_type' => 'blog_blogs',
);
break;
break;
case 'convertBlogEntries':
$return[ $k ] = array(
@@ -64,7 +64,7 @@ class _Blog extends Core
'dependencies' => array( 'convertBlogs' ),
'link_type' => 'blog_entries',
);
break;
break;
case 'convertBlogComments':
$return[ $k ] = array(
@@ -76,7 +76,7 @@ class _Blog extends Core
'dependencies' => array( 'convertBlogEntries' ),
'link_type' => 'bog_comments',
);
break;
break;
case 'convertBlogRssImport':
$return[ $k ] = array(
@@ -88,7 +88,43 @@ class _Blog extends Core
'dependencies' => array( 'convertBlogs' ),
'link_type' => 'blog_rss_import',
);
break;
case 'convertClubBlogs':
$return[ $k ] = array(
'step_title' => 'convert_club_blogs',
'step_method' => 'convertClubBlogs',
'ips_rows' => \IPS\Db::i()->select( 'COUNT(*)', 'blog_blogs', array( "blog_club_id IS NOT NULL" ) )->first(),
'source_rows' => $this->software->countRows( $v['table'], $v['where'] ),
'per_cycle' => 2000,
'dependencies' => array( 'convertClubs' ),
'link_type' => 'core_club_blogs'
);
break;
case 'convertClubBlogEntries':
$return[ $k ] = array(
'step_title' => 'convert_club_blog_entries',
'step_method' => 'convertClubBlogEntries',
'ips_rows' => (int) \IPS\Db::i()->select( 'SUM(blog_entries)', 'blog_blogs', array( "blog_club_id IS NOT NULL" ) )->first(),
'source_rows' => $this->software->countRows( $v['table'], $v['where'] ),
'per_cycle' => 1000,
'dependencies' => array( 'convertClubBlogs' ),
'link_type' => 'core_club_blogs_entries'
);
break;
case 'convertClubBlogComments':
$return[ $k ] = array(
'step_title' => 'convert_club_blog_comments',
'step_method' => 'convertClubBlogComments',
'ips_rows' => (int) \IPS\Db::i()->select( 'SUM(blog_comments)', 'blog_blogs', array( "blog_club_id IS NOT NULL" ) )->first(),
'source_rows' => $this->software->countRows( $v['table'], $v['where'] ),
'per_cycle' => 1000,
'dependencies' => array( 'convertClubBlogEntries' ),
'link_type' => 'core_club_blogs_comments'
);
break;
case 'convertAttachments':
$return[ $k ] = array(
@@ -100,7 +136,7 @@ class _Blog extends Core
'dependencies' => array( 'convertBlogEntries', 'convertBlogComments' ),
'link_type' => 'core_attachments',
);
break;
break;
}
}
@@ -128,27 +164,39 @@ class _Blog extends Core
{
/* Should return multiple array members for each table that needs to be truncated. The key should be the table, while the value should be a WHERE clause, or NULL to completely empty the table */
case 'convertBlogs':
$return['convertBlogs'] = array( 'blog_blogs' => NULL );
break;
$return['convertBlogs'] = array( 'blog_blogs' => NULL, 'core_clubs_node_map' => array( "node_class=?", "IPS\\blog\\Blog" ) );
break;
case 'convertBlogEntries':
$return['convertBlogEntries'] = array( 'blog_entries' => NULL );
break;
break;
case 'convertBlogComments':
$return['convertBlogComments'] = array( 'blog_comments' => NULL );
break;
break;
case 'convertBlogRssImport':
$return['convertBlogRssImport'] = array( 'blog_rss_import' => NULL, 'blog_rss_imported' => NULL );
break;
break;
case 'convertAttachments':
$return['convertAttachments'] = array(
'core_attachments' => \IPS\Db::i()->in( \IPS\Db::i()->select( 'attachment_id', 'core_attachments_map', array( "location_key=?", 'blog_Entries' ) ) ),
'core_attachments_map' => array( "location_key=?", 'blog_Entries' )
);
break;
break;
case 'convertClubBlogs':
$return['convertClubBlogs'] = array( "blog_blogs" => array( "blog_club_id IS NOT NULL" ) );
break;
case 'convertClubBlogEntries':
$return['convertClubBlogEntries'] = array( 'blog_entries' => array( 'entry_id IN ( ' . (string) \IPS\Db::i()->select( 'ipb_id', 'convert_link', array( "type='core_clubs_blog_entries' AND app={$this->software->app->app_id}" ) ) . ')' ) );
break;
case 'convertClubBlogComments':
$return['convertClubBlogComments'] = array( 'blog_comments' => array( 'comment_id IN ( ' . (string) \IPS\Db::i()->select( 'ipb_id', 'convert_link', array( "type='core_clubs_blog_comments' AND app={$this->software->app->app_id}" ) ) . ')' ) );
break;
}
}
@@ -284,7 +332,7 @@ class _Blog extends Core
if ( $owner->member_id )
{
$name = "{$member->name}'s Blog";
$name = "{$owner->name}'s Blog";
}
else
{
@@ -366,6 +414,12 @@ class _Blog extends Core
$info[ $column ] = 0;
}
}
/* Sidebar */
if( !isset( $info['blog_sidebar'] ) OR !$info['blog_sidebar'] )
{
$info['blog_sidebar'] = NULL;
}
/* Well update this later if we need too */
$info['blog_social_group'] = NULL;
@@ -422,6 +476,22 @@ class _Blog extends Core
$info['blog_cover_photo_offset'] = NULL;
}
if ( isset( $info['blog_club_id'] ) )
{
try
{
$info['blog_club_id'] = $this->software->app->getLink( $info['blog_club_id'], 'core_clubs', TRUE );
}
catch( \OutOfRangeException $e )
{
$info['blog_club_id'] = NULL;
}
}
else
{
$info['blog_club_id'] = NULL;
}
$id = $info['blog_id'];
unset( $info['blog_id'] );
@@ -431,6 +501,18 @@ class _Blog extends Core
\IPS\Lang::saveCustom( 'blog', "blogs_blog_{$inserted_id}", $name );
\IPS\Lang::saveCustom( 'blog', "blogs_blog_{$inserted_id}_desc", $desc );
if ( $info['blog_club_id'] )
{
\IPS\Db::i()->insert( 'core_clubs_node_map', array(
'club_id' => $info['blog_club_id'],
'node_class' => "IPS\\blog\\Blog",
'node_id' => $inserted_id,
'name' => $name
) );
\IPS\blog\Blog::load( $inserted_id )->setPermissionsToClub( \IPS\Member\Club::load( $info['blog_club_id'] ) );
}
return $inserted_id;
}
@@ -920,4 +1002,52 @@ class _Blog extends Core
return parent::convertAttachment( $info, $map, $filepath, $filedata );
}
/**
* Convert Club Blog
*
* @param array $info Data to insert
* @return integer|boolean The ID of the newly insertd blog, or FALSE on failure.
*/
public function convertClubBlog( $info=array() )
{
$insertedId = $this->convertBlog( $info );
if ( $insertedId )
{
$this->software->app->addLink( $insertedId, $info['blog_id'], 'core_clubs_blogs' );
}
return $insertedId;
}
/**
* Convert a Club Blog Entry
*
* @param array $info Data to insert
* @return integer|boolean The ID of the newly inserted entry, or FALSE on failure.
*/
public function convertClubBlogEntry( $info=array() )
{
$insertedId = $this->convertBlogEntry( $info );
if ( $insertedId )
{
$this->software->app->addLink( $insertedId, $info['entry_id'], 'core_clubs_blog_entries' );
}
return $insertedId;
}
/**
* Convert a Club Blog Comment
*
* @param array $info Data to insert
* @return integer|boolean The ID of the newly inserted comment, or FALSE on failure.
*/
public function convertClubBlogComment( $info=array() )
{
$insertedId = $this->convertBlogComment( $info );
if ( $insertedId )
{
$this->software->app->addLink( $insertedId, $info['comment_id'], 'core_clubs_blog_comments' );
}
return $insertedId;
}
}
@@ -2,9 +2,9 @@
/**
* @brief Converter Library Legacy Board 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
*/
@@ -2,9 +2,9 @@
/**
* @brief Converter Library Calendar 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
*/
@@ -50,6 +50,18 @@ class _Calendar extends Core
'link_type' => 'calendar_calendars',
);
break;
case 'convertCalendarVenues':
$return[ $k ] = array(
'step_title' => 'convert_calendar_venues',
'step_method' => 'convertCalendarVenues',
'ips_rows' => \IPS\Db::i()->select( 'COUNT(*)', 'calendar_venues' )->first(),
'source_rows' => $this->software->countRows( $v['table'], $v['where'] ),
'per_cycle' => 100,
'dependencies' => array( 'convertCalendarCalendars' ),
'link_type' => 'calendar_venues',
);
break;
case 'convertCalendarEvents':
$return[ $k ] = array(
@@ -110,6 +122,18 @@ class _Calendar extends Core
'link_type' => 'calendar_import_feeds',
);
break;
case 'convertCalendarReminders':
$return[ $k ] = array(
'step_title' => 'convert_calendar_reminders',
'step_method' => 'convertCalendarReminders',
'ips_rows' => \IPS\Db::i()->select( 'COUNT(*)', 'calendar_event_reminders' )->first(),
'source_rows' => $this->software->countRows( $v['table'], $v['where'] ),
'per_cycle' => 100,
'dependencies' => array( 'convertCalendarEvents' ),
'link_type' => 'calendar_reminders',
);
break;
case 'convertAttachments':
$return[ $k ] = array(
@@ -148,7 +172,7 @@ class _Calendar extends Core
switch( $k )
{
case 'convertCalendarCalendars':
$return['convertCalendarCalendars'] = array( 'calendar_calendars' => NULL );
$return['convertCalendarCalendars'] = array( 'calendar_calendars' => NULL, 'core_clubs_node_map' => array( "node_class=?", "IPS\\calendar\\Calendar" ) );
break;
case 'convertCalendarEvents':
@@ -170,6 +194,14 @@ class _Calendar extends Core
case 'convertCalendarFeeds':
$return['convertCalendarFeeds'] = array( 'calender_import_feeds' => NULL );
break;
case 'convertCalendarVenues':
$return['convertCalendarVenues'] = array( 'calender_venues' => NULL );
break;
case 'convertCalendarReminders':
$return['convertCalendarReminders'] = array( 'calender_reminders' => NULL );
break;
case 'convertAttachments':
$return['convertAttachments'] = array( 'core_attachments' => array( "location_key=?", 'calendar_Events' ) );
@@ -257,6 +289,22 @@ class _Calendar extends Core
$info['cal_color'] = $genericCalendar->_generateColor();
}
if ( isset( $info['cal_club_id'] ) )
{
try
{
$info['cal_club_id'] = $this->software->app->getLink( $info['cal_club_id'], 'core_clubs', TRUE );
}
catch( \OutOfRangeException $e )
{
$info['cal_club_id'] = NULL;
}
}
else
{
$info['cal_club_id'] = NULL;
}
$id = $info['cal_id'];
unset( $info['cal_id'] );
@@ -266,6 +314,18 @@ class _Calendar extends Core
\IPS\Lang::saveCustom( 'calendar', "calendar_calendar_{$inserted_id}", $name );
\IPS\Lang::saveCustom( 'calendar', "calendar_calendar_{$inserted_id}_desc", $desc );
if ( $info['cal_club_id'] )
{
\IPS\Db::i()->insert( 'core_clubs_node_map', array(
'node_id' => $inserted_id,
'node_class' => "IPS\\calendar\\Calendar",
'club_id' => $info['cal_club_id'],
'name' => $name,
) );
\IPS\calendar\Calendar::load( $inserted_id )->setPermissionsToClub( \IPS\Member\Club::load( $info['cal_club_id'] ) );
}
return $inserted_id;
}
@@ -318,6 +378,22 @@ class _Calendar extends Core
{
$info['event_member_id'] = 0;
}
if ( isset( $info['event_venue'] ) )
{
try
{
$info['event_venue'] = $this->software->app->getLink( $info['event_venue'], 'calendar_venues', TRUE );
}
catch( \OutOfRangeException $e )
{
$info['event_venue'] = NULL;
}
}
else
{
$info['event_venue'] = NULL;
}
if ( !isset( $info['event_title'] ) )
{
@@ -1080,6 +1156,144 @@ class _Calendar extends Core
return $inserted_id;
}
/**
* Convert a Calendar Venue
*
* @param array $info Data to insert
* @return integer|boolean The ID of the newly inserted venue, or FALSE on failure.
*/
public function convertCalendarVenue( $info=array() )
{
if ( !isset( $info['venue_id'] ) )
{
$this->software->app->log( 'calendar_venue_missing_ids', __METHOD__, \IPS\convert\App::LOG_WARNING );
return FALSE;
}
if ( !isset( $info['venue_title'] ) )
{
$info['venue_title'] = "Untitled Venue {$info['venue_id']}";
$this->software->app->log( 'calendar_venue_missing_title', __METHOD__, \IPS\convert\App::LOG_WARNING, $info['venue_id'] );
}
if ( isset( $info['venue_enabled'] ) )
{
$info['venue_enabled'] = 1;
}
if ( isset( $info['venue_address'] ) )
{
if ( is_array( $info['venue_address'] ) AND isset( $info['venue_address']['lat'] ) AND isset( $info['venue_address']['long'] ) )
{
$info['venue_address'] = (string) \IPS\GeoLocation::getFromLatLong( $info['venue_address']['lat'], $info['venue_address']['long'] );
}
else if ( $info['venue_address'] instanceof \IPS\GeoLocation )
{
$info['venue_address'] = (string) $info['venue_address'];
}
else
{
$this->software->app->log( 'calendar_venue_missing_address', __METHOD__, \IPS\convert\App::LOG_WARNING );
return FALSE;
}
}
else
{
$this->software->app->log( 'calendar_venue_missing_address', __METHOD__, \IPS\convert\App::LOG_WARNING );
return FALSE;
}
if ( !isset( $info['venue_position'] ) )
{
$position = \IPS\Db::i()->select( 'MAX(venue_position)', 'calendar_venues' )->first();
$info['venue_position'] = $position + 1;
}
$id = $info['venue_id'];
unset( $info['venue_id'] );
$inserted_id = \IPS\Db::i()->insert( 'calendar_venues', $info );
$this->software->app->addLink( $inserted_id, $id, 'calendar_venues' );
return $inserted_id;
}
/**
* Convert a Calendar Event Reminder
*
* @param array $info Data to insert
* @return integer|boolean The ID of the newly inserted reminder, or FALSE on failure.
*/
public function convertCalendarReminder( $info=array() )
{
if ( !isset( $info['reminder_id'] ) )
{
$this->software->app->log( 'calendar_reminder_missing_ids', __METHOD__, \IPS\convert\App::LOG_WARNING );
return FALSE;
}
if ( isset( $info['reminder_days_before'] ) )
{
$info['reminder_days_before'] = 1;
}
if ( isset( $info['reminder_event_id'] ) )
{
try
{
$info['reminder_event_id'] = $this->software->app->getLink( $info['reminder_event_id'], 'calendar_events' );
}
catch( \OutOfRangeException $e )
{
$this->software->app->log( 'calendar_reminder_missing_event', __METHOD__, \IPS\convert\App::LOG_WARNING, $info['reminder_id'] );
return FALSE;
}
}
else
{
$this->software->app->log( 'calendar_reminder_missing_event', __METHOD__, \IPS\convert\App::LOG_WARNING, $info['reminder_id'] );
return FALSE;
}
if ( isset( $info['reminder_member_id'] ) )
{
try
{
$info['reminder_member_id'] = $this->software->app->getLink( $info['reminder_member_id'], 'core_members', TRUE );
}
catch( \OutOfRangeException $e )
{
$this->software->app->log( 'calendar_reminder_missing_member', __METHOD__, \IPS\convert\App::LOG_WARNING, $info['reminder_id'] );
return FALSE;
}
}
else
{
$this->software->app->log( 'calendar_reminder_missing_member', __METHOD__, \IPS\convert\App::LOG_WARNING, $info['reminder_id'] );
return FALSE;
}
if ( isset( $info['reminder_date'] ) )
{
if ( $info['reminder_date'] instanceof \IPS\DateTime )
{
$info['reminder_date'] = $info['reminder_date']->getTimestamp();
}
}
else
{
$info['reminder_date'] = time();
}
$id = $info['reminder_id'];
unset( $info['reminder_id'] );
$inserted_id = \IPS\Db::i()->insert( 'calendar_event_reminders', $info );
$this->software->app->addLink( $inserted_id, $id, 'calendar_event_reminders' );
return $inserted_id;
}
/**
* Convert an attachment
+3 -3
View File
@@ -2,9 +2,9 @@
/**
* @brief Converter Library Legacy CCS 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
*/
+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' )
{
File diff suppressed because it is too large. Load diff
@@ -2,9 +2,9 @@
/**
* @brief Converter Library Downloads 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
*/
@@ -116,7 +116,55 @@ class _Downloads extends Core
'link_type' => 'downloads_reviews',
);
break;
case 'convertClubDownloadsCategories':
$return[ $k ] = array(
'step_title' => 'convert_club_downloads_categories',
'step_method' => 'convertClubDownloadsCategories',
'ips_rows' => \IPS\Db::i()->select( 'COUNT(*)', 'downloads_categories', array( "cclub_id IS NOT NULL" ) )->first(),
'source_rows' => $this->software->countRows( $v['table'], $v['where'] ),
'per_cycle' => 1000,
'dependencies' => array( 'convertClubs' ),
'link_type' => 'core_club_downloads_categories',
);
break;
case 'convertClubDownloadsFiles':
$return[ $k ] = array(
'step_title' => 'convert_club_downloads_files',
'step_method' => 'convertClubDownloadsFiles',
'ips_rows' => \IPS\Db::i()->select( 'COUNT(*)', 'downloads_files', array( \IPS\Db::i()->in( 'file_category_id', \IPS\Db::i()->select( 'cid', 'downloads_categories', array( "cclub_id IS NOT NULL" ) ) ) ) )->first(),
'source_rows' => $this->software->countRows( $v['table'], $v['where'] ),
'per_cycle' => 100,
'dependencies' => array( 'convertClubDownloadsCategories' ),
'link_type' => 'core_club_downloads_files'
);
break;
case 'convertClubDownloadsComments':
$return[ $k ] = array(
'step_title' => 'convert_club_downloads_comments',
'step_method' => 'convertClubDownloadsComments',
'ips_rows' => \IPS\Db::i()->select( 'COUNT(*)', 'downloads_comments', array( \IPS\Db::i()->in( 'comment_file_id', \IPS\Db::i()->select( 'file_id', 'downloads_files', array( \IPS\Db::i()->in( 'file_category_id', \IPS\Db::i()->select( 'cid', 'downloads_categories', array( "cclub_id IS NOT NULL" ) ) ) ) ) ) ) )->first(),
'source_rows' => $this->software->countRows( $v['table'], $v['where'] ),
'per_cycle' => 1000,
'dependencies' => array( 'convertClubDownloadsFiles' ),
'link_type' => 'core_club_downloads_comments',
);
break;
case 'convertClubDownloadsReviews':
$return[ $k ] = array(
'step_title' => 'convert_club_downloads_reviews',
'step_method' => 'convertClubDownloadsReviews',
'ips_rows' => \IPS\Db::i()->select( 'COUNT(*)', 'downloads_files_reviews', array( \IPS\Db::i()->in( 'review_file_id', \IPS\Db::i()->select( 'file_id', 'downloads_files', array( \IPS\Db::i()->in( 'file_category_id', \IPS\Db::i()->select( 'cid', 'downloads_categories', array( "cclub_id IS NOT NULL" ) ) ) ) ) ) ) )->first(),
'source_rows' => $this->software->countRows( $v['table'], $v['where'] ),
'per_cycle' => 1000,
'dependencies' => array( 'convertClubDownloadsFiles' ),
'link_type' => 'core_club_downloads_reviews',
);
break;
case 'convertAttachments':
$return[ $k ] = array(
'step_method' => 'convertAttachments',
@@ -183,6 +231,22 @@ class _Downloads extends Core
case 'convertAttachments':
$return['convertAttachments'] = array( 'core_attachments' => \IPS\Db::i()->select( 'attachment_id', 'core_attachments_map', array( "location_key=?", 'downloads_Downloads' ) ), 'core_attachments_map' => array( "location_key=?", 'downloads_Downloads' ) );
break;
case 'convertClubDownloadsCategories':
$return['convertClubDownloadsCategories'] = array( 'downloads_categories' => array( "cclub_id IS NOT NULL" ) );
break;
case 'convertClubDownloadsFiles':
$return['convertClubDownloadsFiles'] = array( 'downloads_files' => array( 'file_id IN ( ' . (string) \IPS\Db::i()->select( 'ipb_id', 'convert_link', array( "type='core_clubs_downloads_files' AND app={$this->software->app->app_id}" ) ) . ')' ) );
break;
case 'convertClubDownloadsComments':
$return['convertClubDownloadsComments'] = array( 'downloads_comments' => array( 'comment_id IN ( ' . (string) \IPS\Db::i()->select( 'ipb_id', 'convert_link', array( "type='core_clubs_downloads_comments' AND app={$this->software->app->app_id}" ) ) . ')' ) );
break;
case 'convertClubDownloadsReviews':
$return['convertClubDownloadsFiles'] = array( 'downloads_reviews' => array( 'review_id IN ( ' . (string) \IPS\Db::i()->select( 'ipb_id', 'convert_link', array( "type='core_clubs_downloads_reviews' AND app={$this->software->app->app_id}" ) ) . ')' ) );
break;
}
}
@@ -605,6 +669,23 @@ class _Downloads extends Core
$info['ctopic_suffix'] = '';
}
if ( isset( $info['cclub_id'] ) )
{
try
{
$info['cclub_id'] = $this->software->app->getLink( $info['cclub_id'], 'core_clubs', TRUE );
}
catch( \OutOfRangeException $e )
{
$info['cclub_id'] = NULL;
}
}
else
{
$info['cclub_id'] = NULL;
}
/* Can't know this */
$info['clast_file_id'] = 0;
$info['clast_file_date'] = 0;
@@ -621,6 +702,18 @@ class _Downloads extends Core
\IPS\Db::i()->update( 'downloads_categories', array( "cparent" => $inserted_id ), array( "cconv_parent=? AND cconv_parent<>?", $id, 0 ) );
if ( $info['cclub_id'] )
{
\IPS\Db::i()->insert( 'core_clubs_node_map', array(
'node_id' => $inserted_id,
'node_class' => "IPS\\downloads\\Category",
'club_id' => $info['cclub_id'],
'name' => $name
) );
\IPS\downloads\Category::load( $inserted_id )->setPermissionsToClub( \IPS\Member\Club::load( $info['cclub_id'] ) );
}
return $inserted_id;
}
@@ -911,15 +1004,13 @@ class _Downloads extends Core
try
{
if ( !isset( $record['file_data'] ) OR is_null( $record['file_data'] ) )
if ( !isset( $record['file_data'] ) )
{
$record['file_data'] = file_get_contents( $record['file_path'] );
}
if ( $record['record_type'] != 'link' )
{
unset( $record['file_path'] );
$record['file_data'] = NULL;
}
/* We need the file storage to copy the file rather than move it */
\IPS\File\FileSystem::$converterCopy = TRUE;
if ( $record['record_type'] == 'link' )
{
@@ -930,7 +1021,7 @@ class _Downloads extends Core
}
else if ( $record['record_type'] == 'upload' )
{
$file = \IPS\File::create( 'downloads_Files', $record['record_realname'], $record['file_data'] );
$file = \IPS\File::create( 'downloads_Files', $record['record_realname'], $record['file_data'], NULL, TRUE, $record['file_path'] );
$record['record_location'] = (string) $file;
$record['record_size'] = $file->filesize();
@@ -941,7 +1032,7 @@ class _Downloads extends Core
}
else
{
$file = \IPS\File::create( 'downloads_Screenshots', $record['record_realname'], $record['file_data'] );
$file = \IPS\File::create( 'downloads_Screenshots', $record['record_realname'], $record['file_data'], NULL, TRUE, $record['file_path'] );
$record['record_location'] = (string) $file;
$record['record_thumb'] = (string) $file->thumbnail( 'downloads_Files' );
$record['record_size'] = $file->filesize();
@@ -957,8 +1048,10 @@ class _Downloads extends Core
$this->software->app->log( $e->getMessage(), __METHOD__, \IPS\convert\App::LOG_WARNING, ( $hasId ) ? $record['record_id'] : NULL );
continue;
}
unset( $record['file_data'] );
/* Revert file system to default functionality */
\IPS\File\FileSystem::$converterCopy = FALSE;
unset( $record['file_data'], $file );
if ( isset( $record['record_time'] ) )
{
@@ -1358,4 +1451,69 @@ class _Downloads extends Core
return parent::convertAttachment( $info, $map, $filepath, $filedata );
}
/**
* Convert a Club Downloads Category
*
* @param array $info Data to insert
* @return integer|boolean The ID of the newly inserted category, or FALSE on failure.
*/
public function convertClubDownloadsCategory( $info=array() )
{
$insertedId = $this->convertDownloadsCategory( $info );
if ( $insertedId )
{
$this->software->app->addLink( $insertedId, $info['cid'], 'core_clubs_downloads_categories' );
}
return $insertedId;
}
/**
* Convert a Club Downloads File
*
* @param array $info Data to insert
* @param array $records File Records
* @return integer|boolean The ID of the newly inserted file, or FALSE on failure.
*/
public function convertClubDownloadsFile( $info=array(), $records=array() )
{
$insertedId = $this->convertDownloadsFile( $info, $records );
if ( $insertedId )
{
$this->software->app->addLink( $insertedId, $info['file_id'], 'core_clubs_downloads_files' );
}
return $insertedId;
}
/**
* Convert a Club Downloads Comment
*
* @param array $info Data to insert
* @return integer|boolean The ID of the newly inserted comment, or FALSE on failure.
*/
public function convertClubDownloadsComment( $info=array() )
{
$insertedId = $this->convertDownloadsComment( $info );
if ( $insertedId )
{
$this->software->app->addLink( $insertedId, $info['comment_id'], 'core_clubs_downloads_comments' );
}
return $insertedId;
}
/**
* Convert a Club Downloads Review
*
* @param array $info Data to insert
* @return integer|boolean The ID of the newly inserted comment, or FALSE on failure.
*/
public function convertClubDownloadsReview( $info=array() )
{
$insertedId = $this->convertDownloadsReview( $info );
if ( $insertedId )
{
$this->software->app->addLink( $insertedId, $info['review_id'], 'core_clubs_downloads_reviews' );
}
return $insertedId;
}
}
+164 -20
View File
@@ -2,9 +2,9 @@
/**
* @brief Converter Library Forums 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
*/
@@ -161,6 +161,44 @@ class _Forums extends Core
'link_type' => 'core_attachments',
);
break;
case 'convertClubForums':
$return[ $k ] = array(
'step_title' => 'convert_club_forums',
'step_method' => 'convertClubForums',
'ips_rows' => \IPS\Db::i()->select( 'COUNT(*)', 'forums_forums', array( "club_id IS NOT NULL" ) )->first(),
'source_rows' => $this->software->countRows( $v['table'], $v['where'] ),
'per_cycle' => 2000,
'dependencies' => array( 'convertForumsForums' ),
'link_type' => 'core_club_forums'
);
break;
case 'convertClubTopics':
$return[ $k ] = array(
'step_title' => 'convert_club_topics',
'step_method' => 'convertClubTopics',
'ips_rows' => (int) \IPS\Db::i()->select( 'COUNT(tid)', 'forums_topics', array( 'forum_id IN ( ' . (string) \IPS\Db::i()->select( 'id', 'forums_forums', array( "club_id IS NOT NULL" ) ) . ')' ) )->first(),
'source_rows' => $this->software->countRows( $v['table'], $v['where'] ),
'per_cycle' => 1000,
'dependencies' => array( 'convertClubForums' ),
'link_type' => 'core_club_topics'
);
break;
case 'convertClubPosts':
$return[ $k ] = array(
'step_title' => 'convert_club_posts',
'step_method' => 'convertClubPosts',
'ips_rows' => (int) \IPS\Db::i()->select( 'COUNT(pid)', 'forums_forums', array( "club_id IS NOT NULL" ) )
->join( 'forums_topics', 'forums_topics.forum_id=forums_forums.id')
->join( 'forums_posts', 'forums_posts.topic_id=forums_topics.tid')->first(),
'source_rows' => $this->software->countRows( $v['table'], $v['where'] ),
'per_cycle' => 1000,
'dependencies' => array( 'convertClubTopics' ),
'link_type' => 'core_club_posts'
);
break;
}
}
@@ -205,6 +243,7 @@ class _Forums extends Core
case 'convertForumsForums':
$return['convertForumsForums'] = array(
'core_follow' => array( 'follow_app=? AND follow_area=?', 'forums', 'forum' ),
'core_clubs_node_map' => array( "node_class=?", "IPS\\forums\\Forum" ),
'forums_forums' => NULL
);
break;
@@ -262,6 +301,18 @@ class _Forums extends Core
}
$return['convertAttachments'] = array( 'core_attachments' => \IPS\Db::i()->in( 'attach_id', $attachIds ), 'core_attachments_map' => array( "location_key=?", 'forums_Forums' ) );
break;
case 'convertClubForums':
$return['convertClubForums'] = array( 'forums_forums' => array( "club_id IS NOT NULL" ), 'core_clubs_node_map' => array( 'node_class=?', 'IPS\\forums\\Forum' ) );
break;
case 'convertClubTopics':
$return['convertClubTopics'] = array( 'forums_topics' => array( 'tid IN ( ' . (string) \IPS\Db::i()->select( 'ipb_id', 'convert_link', array( "type='core_clubs_topics' AND app={$this->software->app->app_id}" ) ) . ')' ) );
break;
case 'convertClubPosts':
$return['convertClubPosts'] = array( 'forums_posts' => array( 'pid IN ( ' . (string) \IPS\Db::i()->select( 'ipb_id', 'convert_link', array( "type='core_clubs_posts' AND app={$this->software->app->app_id}" ) ) . ')' ) );
break;
}
}
return $return[$method];
@@ -364,27 +415,30 @@ class _Forums extends Core
}
/* Do parent_id now - we'll need it later */
if ( isset( $info['parent_id'] ) )
if ( !isset( $info['club_id'] ) )
{
if ( $info['parent_id'] != -1 )
if ( isset( $info['parent_id'] ) )
{
try
if ( $info['parent_id'] != -1 )
{
$info['parent_id'] = $this->software->app->getLink( $info['parent_id'], 'forums_forums' );
}
catch( \OutOfRangeException $e )
{
/* Does the ID exist in the source? */
$info['conv_parent'] = $info['parent_id'];
/* Default to a category unless a later converted forum updates the parent_id */
$info['parent_id'] = -1;
try
{
$info['parent_id'] = $this->software->app->getLink( $info['parent_id'], 'forums_forums' );
}
catch( \OutOfRangeException $e )
{
/* Does the ID exist in the source? */
$info['conv_parent'] = $info['parent_id'];
/* Default to a category unless a later converted forum updates the parent_id */
$info['parent_id'] = -1;
}
}
}
}
else
{
$info['parent_id'] = $this->_getOrphanedForumCategory();
else
{
$info['parent_id'] = $this->_getOrphanedForumCategory();
}
}
if ( !isset( $info['position'] ) )
@@ -707,7 +761,7 @@ class _Forums extends Core
{
$icondata = file_get_contents( $iconpath );
}
$file = \IPS\File::create( 'forums_Icons', $info['icon'], $filedata );
$file = \IPS\File::create( 'forums_Icons', $info['icon'], $icondata );
$info['icon'] = (string) $file;
}
else
@@ -724,6 +778,36 @@ class _Forums extends Core
$info['icon'] = NULL;
}
if ( isset( $info['club_id'] ) )
{
try
{
$info['club_id'] = $this->software->app->getLink( $info['club_id'], 'core_clubs', TRUE );
}
catch( \OutOfRangeException $e )
{
if ( $info['club_id'] )
{
try
{
$info['parent_id'] = $this->software->app->getLink( '__orphan_club_forum__', 'core_clubs', TRUE );
}
catch( \OutOfRangeException $e )
{
$info['parent_id'] = $this->convertForumsForum( array(
'id' => '__orphan_club_forum__',
'name' => 'Orphaned Club Forums',
'parent_id' => -1
) );
}
}
}
}
else
{
$info['club_id'] = NULL;
}
$id = $info['id'];
unset( $info['id'] );
@@ -735,6 +819,18 @@ class _Forums extends Core
\IPS\Db::i()->update( 'forums_forums', array( "parent_id" => $inserted_id ), array( "conv_parent=? AND conv_parent<>?", $id, 0 ) );
if ( $info['club_id'] )
{
\IPS\Db::i()->insert( 'core_clubs_node_map', array(
'club_id' => $info['club_id'],
'node_class' => "IPS\\forums\\Forum",
'node_id' => $inserted_id,
'name' => $name
) );
\IPS\forums\Forum::load( $inserted_id )->setPermissionsToClub( \IPS\Member\Club::load( $info['club_id'] ) );
}
return $inserted_id;
}
@@ -1971,4 +2067,52 @@ class _Forums extends Core
return parent::convertAttachment( $info, $map, $filepath, $filedata );
}
/**
* Convert a Club Forum
*
* @param array $info Data to insert
* @return integer|boolean The ID of the newly inserted forum, or FALSE on failure.
*/
public function convertClubForum( $info=array() )
{
$insertedId = $this->convertForumsForum( $info );
if ( $insertedId )
{
$this->software->app->addLink( $insertedId, $info['id'], 'core_clubs_forums' );
}
return $insertedId;
}
/**
* Convert a Club Topic
*
* @param array $info Data to insert
* @return integer|boolean The ID of the newly inserted topic, or FALSE on failure.
*/
public function convertClubTopic( $info=array() )
{
$insertedId = $this->convertForumsTopic( $info );
if ( $insertedId )
{
$this->software->app->addLink( $insertedId, $info['tid'], 'core_clubs_topics' );
}
return $insertedId;
}
/**
* Convert a Club Post
*
* @param array $info Data to insert
* @return integer|boolean The ID of the newly inserted post, or FALSE on failure.
*/
public function convertClubPost( $info=array() )
{
$insertedId = $this->convertForumsPost( $info );
if ( $insertedId )
{
$this->software->app->addLink( $insertedId, $info['pid'], 'core_clubs_posts' );
}
return $insertedId;
}
}
@@ -2,9 +2,9 @@
/**
* @brief Converter Library Gallery 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
*/
@@ -119,6 +119,54 @@ class _Gallery extends Core
'link_type' => 'gallery_reviews',
);
break;
case 'convertClubGalleryCategories':
$return[ $k ] = array(
'step_title' => 'convert_club_gallery_categories',
'step_method' => 'convertClubGalleryCategories',
'ips_rows' => \IPS\Db::i()->select( 'COUNT(*)', 'gallery_categories', array( "category_club_id IS NOT NULL" ) )->first(),
'source_rows' => $this->software->countRows( $v['table'], $v['where'] ),
'per_cycle' => 1000,
'dependencies' => array( 'convertGalleryImages' ),
'link_type' => 'core_club_gallery_categories'
);
break;
case 'convertClubGalleryImages':
$return[ $k ] = array(
'step_title' => 'convert_club_gallery_images',
'step_method' => 'convertClubGalleryImages',
'ips_rows' => (int) \IPS\Db::i()->select( 'SUM(category_count_imgs)', 'gallery_categories', array( "category_club_id IS NOT NULL" ) )->first(),
'source_rows' => $this->software->countRows( $v['table'], $v['where'] ),
'per_cycle' => 100,
'dependencies' => array( 'convertClubGalleryCategories' ),
'link_type' => 'core_club_gallery_images'
);
break;
case 'convertClubGalleryComments':
$return[ $k ] = array(
'step_title' => 'convert_club_gallery_comments',
'step_method' => 'convertClubGalleryComments',
'ips_rows' => (int) \IPS\Db::i()->select( 'SUM(category_count_comments)', 'gallery_categories', array( "category_club_id IS NOT NULL" ) )->first(),
'source_rows' => $this->software->countRows( $v['table'], $v['where'] ),
'per_cycle' => 1000,
'dependencies' => array( 'convertClubGalleryImages' ),
'link_type' => 'core_club_gallery_comments'
);
break;
case 'convertClubGalleryReviews':
$return[ $k ] = array(
'step_title' => 'convert_club_gallery_reviews',
'step_method' => 'convertClubGalleryReviews',
'ips_rows' => \IPS\Db::i()->select( 'COUNT(*)', 'gallery_reviews', array( \IPS\Db::i()->in( 'review_image_id', \IPS\Db::i()->select( 'image_id', 'gallery_images', array( \IPS\Db::i()->in( 'image_category_id', \IPS\Db::i()->select( 'category_id', 'gallery_categories', array( "category_club_id IS NOT NULL" ) ) ) ) ) ) ) )->first(),
'source_rows' => $this->software->countRows( $v['table'], $v['where'] ),
'per_cycle' => 1000,
'dependencies' => array( 'convertClubGalleryImages' ),
'link_type' => 'core_club_gallery_reviews'
);
break;
case 'convertAttachments':
$dependencies = array( 'convertGalleryImages' );
@@ -169,7 +217,7 @@ class _Gallery extends Core
switch( $k )
{
case 'convertGalleryCategories':
$return['convertGalleryCategories'] = array( 'gallery_categories' => NULL );
$return['convertGalleryCategories'] = array( 'gallery_categories' => NULL, 'core_clubs_node_map' => array( "node_class=?", "IPS\\gallery\\Category" ) );
break;
case 'convertGalleryAlbums':
@@ -191,6 +239,22 @@ class _Gallery extends Core
case 'convertAttachments':
$return['convertAttachments'] = array( 'core_attachments' => \IPS\Db::i()->select( 'attachment_id', 'core_attachments_map', array( "location_key=?", 'gallery_Gallery' ) ), 'core_attachments_map' => array( 'location_key=?', 'gallery_Gallery' ) );
break;
case 'convertClubGalleryCategories':
$return['convertClubGalleryCategories'] = array( 'gallery_categories' => array( "category_club_id IS NOT NULL" ) );
break;
case 'convertClubGalleryImages':
$return['convertClubGalleryImages'] = array( 'gallery_images' => array( 'image_id IN ( ' . (string) \IPS\Db::i()->select( 'ipb_id', 'convert_link', array( "type='core_clubs_gallery_images' AND app={$this->software->app->app_id}" ) ) . ')' ) );
break;
case 'convertClubGalleryComments':
$return['convertClubGalleryComments'] = array( 'gallery_comments' => array( 'comment_id IN ( ' . (string) \IPS\Db::i()->select( 'ipb_id', 'convert_link', array( "type='core_clubs_gallery_comments' AND app={$this->software->app->app_id}" ) ) . ')' ) );
break;
case 'convertClubGalleryReviews':
$return['convertClubGalleryReviews'] = array( 'gallery_reviews' => array( 'review_id IN ( ' . (string) \IPS\Db::i()->select( 'ipb_id', 'convert_link', array( "type='core_clubs_gallery_reviews' AND app={$this->software->app->app_id}" ) ) . ')' ) );
break;
}
}
@@ -312,6 +376,22 @@ class _Gallery extends Core
$info['category_position'] = $position + 1;
}
if ( isset( $info['category_club_id'] ) )
{
try
{
$info['category_club_id'] = $this->software->app->getLink( $info['category_club_id'], 'core_clubs', TRUE );
}
catch( \OutOfRangeException $e )
{
$info['category_club_id'] = NULL;
}
}
else
{
$info['category_club_id'] = NULL;
}
$id = $info['category_id'];
unset( $info['category_id'] );
@@ -323,6 +403,18 @@ class _Gallery extends Core
\IPS\Db::i()->update( 'gallery_categories', array( "category_parent_id" => $inserted_id ), array( "category_conv_parent=? AND category_conv_parent<>?", $id, 0 ) );
if ( $info['category_club_id'] )
{
\IPS\Db::i()->insert( 'core_clubs_node_map', array(
'node_id' => $inserted_id,
'node_class' => "IPS\\gallery\\Category",
'club_id' => $info['category_club_id'],
'name' => $name
) );
\IPS\gallery\Category::load( $inserted_id )->setPermissionsToClub( \IPS\Member\Club::load( $info['category_club_id'] ) );
}
return $inserted_id;
}
@@ -658,6 +750,12 @@ class _Gallery extends Core
{
if ( is_null( $filedata ) AND !is_null( $filepath ) )
{
if( !file_exists( $filepath ) )
{
$this->software->app->log( 'gallery_image_missing_file', __METHOD__, \IPS\convert\App::LOG_WARNING, $info['image_id'] );
return FALSE;
}
$filedata = file_get_contents( $filepath );
}
$image = \IPS\File::create( 'gallery_Images', $info['image_file_name'], $filedata );
@@ -1178,4 +1276,70 @@ class _Gallery extends Core
return parent::convertAttachment( $info, $map, $filepath, $filedata );
}
/**
* Convert a Club Gallery Category
*
* @param array $info Data to insert
* @return integer|boolean The ID of the newly inserted category, or FALSE on failure.
*/
public function convertClubGalleryCategory( $info=array() )
{
$insertedId = $this->convertGalleryCategory( $info );
if ( $insertedId )
{
$this->software->app->addLink( $insertedId, $info['category_id'], 'core_clubs_gallery_categories' );
}
return $insertedId;
}
/**
* Convert a Club Gallery Image
*
* @param array $info Data to insert
* @param string|NULL $filepath The path to the image, or NULL.
* @param string|NULL $fileinfo The binary data for the image, or NULL
* @return integer|boolean The ID of the newly inserted image, or FALSE on failure.
*/
public function convertClubGalleryImage( $info=array(), $filepath=NULL, $filedata=NULL )
{
$insertedId = $this->convertGalleryImage( $info, $filepath, $filedata );
if ( $insertedId )
{
$this->software->app->addLink( $insertedId, $info['image_id'], 'core_club_gallery_images' );
}
return $insertedId;
}
/**
* Convert a Club Gallery Comment
*
* @param array $info Data to insert
* @return integer|boolean The ID of the newly inserted comment, or FALSE on failure.
*/
public function convertClubGalleryComment( $info=array() )
{
$insertedId = $this->convertGalleryComment( $info );
if ( $insertedId )
{
$this->software->app->addLink( $insertedId, $info['comment_id'], 'core_club_gallery_comments' );
}
return $insertedId;
}
/**
* Convert a Club Gallery Review
*
* @param array $info Data to insert
* @return integer|boolean The ID of the newly inserted review, or FALSE on failure.
*/
public function convertClubGalleryReview( $info=array() )
{
$insertedId = $this->convertGalleryReview( $info );
if ( $insertedId )
{
$this->software->app->addLink( $insertedId, $info['review_id'], 'core_club_gallery_reviews' );
}
return $insertedId;
}
}
@@ -2,9 +2,9 @@
/**
* @brief Converter Library Nexus 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 6 May 2016
*/
@@ -85,7 +85,7 @@ class _Nexus extends \IPS\convert\Library
$return[ $k ] = array(
'step_title' => 'convert_nexus_customer_history',
'step_method' => 'convertNexusCustomerHistory',
'ips_rows' => \IPS\Db::i()->select( 'COUNT(*)', 'nexus_customer_history' )->first(),
'ips_rows' => \IPS\Db::i()->select( 'COUNT(*)', 'core_member_history', array( 'log_app=?', 'nexus' ) )->first(),
'source_rows' => $this->software->countRows( $v['table'], $v['where'] ),
'per_cycle' => 2000,
'dependencies' => array( 'convertNexusCustomers' ),
@@ -356,7 +356,7 @@ class _Nexus extends \IPS\convert\Library
break;
case 'convertNexusCustomerHistory':
$return['convertNexusCustomerHistory'] = array( 'nexus_customer_history' => NULL );
$return['convertNexusCustomerHistory'] = array( 'core_member_history' => array( 'log_app=?', 'nexus' ) );
break;
case 'convertNexusAlternateContacts':
Whitespace-only changes.