Version 4.5.0

This commit is contained in:
Neo committed 2025-12-19 05:51:58 -08:00
1 parent 1a0c7fd3c2
commit f79dcf067a
3791 files changed
+248032 -76372

No files matched your search

@@ -5,19 +5,22 @@
* @author <a href='https://www.invisioncommunity.com'>Invision Power Services, Inc.</a>
* @copyright (c) Invision Power Services, Inc.
* @package Invision Community
* @subpackage Converter
* @subpackage convert
* @since 17 June 2016
*/
namespace IPS\convert\Software\Forums;
/* To prevent PHP errors (extending class does not exist) revealing path */
if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
{
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
exit;
}
/**
* ExpressionEngine Forums Converter
*/
class _Expressionengine extends \IPS\convert\Software
{
/**
@@ -77,14 +80,21 @@ class _Expressionengine extends \IPS\convert\Software
/**
* Allows software to add additional menu row options
*
* @param array $rows Existing rows
* @return array
*/
public function extraMenuRows( $rows )
public function extraMenuRows()
{
$rows['convertOtherPosts'] = $rows['convertForumsPosts'];
$rows['convertOtherPosts']['step_method'] = 'convertOtherPosts';
$rows['convertOtherPosts']['source_rows'] = array( 'table' => static::canConvert()['convertOtherPosts']['table'], 'where' => static::canConvert()['convertOtherPosts']['where'] );
$rows = array();
$rows['convertOtherPosts'] = array(
'step_title' => 'convert_forums_posts',
'step_method' => 'convertOtherPosts',
'ips_rows' => \IPS\Db::i()->select( 'COUNT(*)', 'forums_posts' ),
'source_rows' => array( 'table' => static::canConvert()['convertOtherPosts']['table'], 'where' => static::canConvert()['convertOtherPosts']['where'] ),
'per_cycle' => 200,
'dependencies' => array( 'convertForumsPosts' ),
'link_type' => 'forums_posts',
'requires_rebuild' => TRUE
);
return $rows;
}
@@ -152,16 +162,16 @@ class _Expressionengine extends \IPS\convert\Software
/**
* Finish - Adds everything it needs to the queues and clears data store
*
* @return string Message to display
* @return array Messages to display
*/
public function finish()
{
/* Content Rebuilds */
\IPS\Task::queue( 'core', 'RebuildContainerCounts', array( 'class' => 'IPS\forums\Forum', 'count' => 0 ), 5, array( 'class' ) );
\IPS\Task::queue( 'core', 'RebuildContainerCounts', array( 'class' => 'IPS\forums\Forum', 'count' => 0 ), 4, array( 'class' ) );
\IPS\Task::queue( 'convert', 'RebuildContent', array( 'app' => $this->app->app_id, 'link' => 'forums_posts', 'class' => 'IPS\forums\Topic\Post' ), 2, array( 'app', 'link', 'class' ) );
\IPS\Task::queue( 'core', 'RebuildItemCounts', array( 'class' => 'IPS\forums\Topic' ), 3, array( 'class' ) );
\IPS\Task::queue( 'convert', 'RebuildFirstPostIds', array( 'app' => $this->app->app_id ), 2, array( 'app' ) );
\IPS\Task::queue( 'convert', 'DeleteEmptyTopics', array( 'app' => $this->app->app_id ), 4, array( 'app' ) );
\IPS\Task::queue( 'convert', 'DeleteEmptyTopics', array( 'app' => $this->app->app_id ), 5, array( 'app' ) );
return array( "f_forum_last_post_data", "f_rebuild_posts", "f_recounting_forums", "f_recounting_topics" );
}
@@ -169,8 +179,8 @@ class _Expressionengine extends \IPS\convert\Software
/**
* Fix post data
*
* @param string raw post data
* @return string parsed post data
* @param string $post Raw post data
* @return string Parsed post data
*/
public static function fixPostData( $post )
{