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

@@ -4,19 +4,22 @@
* @author <a href='https://www.invisioncommunity.com'>Invision Power Services, Inc.</a>
* @copyright (c) Invision Power Services, Inc.
* @package IPS Social Suite
* @subpackage Converter
* @subpackage convert
* @since 21 Jan 2015
*/
namespace IPS\convert\Software\Core;
/* 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;
}
/**
* Vanilla Core Converter
*/
class _Vanilla extends \IPS\convert\Software
{
/**
@@ -49,7 +52,9 @@ class _Vanilla extends \IPS\convert\Software
/**
* Constructor
*
* @param \IPS\convert\App The application to reference for database and other information.
* @param \IPS\convert\App $app The application to reference for database and other information.
* @param bool $needDB Establish a DB connection
* @return void
* @throws \InvalidArgumentException
*/
public function __construct( \IPS\convert\App $app, $needDB=TRUE )
@@ -173,7 +178,7 @@ class _Vanilla extends \IPS\convert\Software
* Attempt to convert a MySQL datetime string into a unix timestamp
*
* @param string $date Date(Time) string
* @return int|null Timestamp on successful conversion, otherwise NULL
* @return \IPS\DateTime Timestamp on successful conversion, otherwise NULL
*/
public static function mysqlToDateTime( $date )
{
@@ -300,7 +305,7 @@ class _Vanilla 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()
{
@@ -333,8 +338,8 @@ class _Vanilla 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 )
{
@@ -371,7 +376,7 @@ class _Vanilla extends \IPS\convert\Software
}
/* Now check for group promotions */
if( count( $libraryClass->groupPromotions ) )
if( \count( $libraryClass->groupPromotions ) )
{
foreach( $libraryClass->groupPromotions as $groupPromotion )
{
@@ -459,7 +464,7 @@ class _Vanilla extends \IPS\convert\Software
}
/* Finally */
$libraryClass->convertMember( $info, NULL, $filename, $filepath );
$libraryClass->convertMember( $info, array(), $filename, $filepath );
$libraryClass->setLastKeyValue( $row['UserID'] );
}
}
@@ -517,7 +522,7 @@ class _Vanilla extends \IPS\convert\Software
'mt_date' => static::mysqlToDateTime( $row['DateInserted'] ),
'mt_starter_id' => $row['InsertUserID'],
'mt_last_post_time' => static::mysqlToDateTime( $row['DateUpdated'] ),
'mt_to_count' => ( isset( $row['CountParticipants'] ) ) ? $row['CountParticipants'] : count( \unserialize( $row['Contributors'] ) ),
'mt_to_count' => ( isset( $row['CountParticipants'] ) ) ? $row['CountParticipants'] : \count( \unserialize( $row['Contributors'] ) ),
'mt_replies' => $row['CountMessages'],
);