Version 4.5.0
This commit is contained in:
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 21 Jan 2015
|
||||
*/
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
/**
|
||||
* PunBB Forums Converter
|
||||
*/
|
||||
class _Punbb extends \IPS\convert\Software
|
||||
{
|
||||
/**
|
||||
@@ -93,11 +96,11 @@ class _Punbb extends \IPS\convert\Software
|
||||
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" );
|
||||
}
|
||||
@@ -105,8 +108,8 @@ class _Punbb 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 )
|
||||
{
|
||||
@@ -229,7 +232,7 @@ class _Punbb extends \IPS\convert\Software
|
||||
'last_poster_name' => $row['last_poster'],
|
||||
'pinned' => ( $row['sticky'] OR $row['announcement'] ) ? 1 : 0,
|
||||
'moved_to' => $moved_to,
|
||||
'moved_on' => ( !is_null( $moved_to ) ) ? $row['posted'] : 0,
|
||||
'moved_on' => ( !\is_null( $moved_to ) ) ? $row['posted'] : 0,
|
||||
);
|
||||
|
||||
$libraryClass->convertForumsTopic( $info );
|
||||
|
||||
Reference in new issue
Block a user