Version 5.0.0 beta 7

This commit is contained in:
Neo committed 2025-12-19 17:18:38 -08:00
1 parent fa2a720105
commit 54d5dcd0a0
156 files changed
+4337 -2995

No files matched your search

@@ -43,7 +43,7 @@ class Vanilla extends Software
/**
* @brief Store the result of the check for reaction support
*/
protected static $_supportsReactions = FALSE;
protected static bool $_supportsReactions = FALSE;
/**
* Constructor
@@ -53,17 +53,15 @@ class Vanilla extends Software
* @return void
* @throws InvalidArgumentException
*/
public function __construct( App $app, $needDB=TRUE )
public function __construct( App $app, bool $needDB=TRUE )
{
$return = parent::__construct( $app, $needDB );
parent::__construct( $app, $needDB );
/* Check for reaction support - This is a Vanilla2 addon, so it may not be installed */
if ( $needDB )
{
static::$_supportsReactions = $this->db->checkForTable( 'Action' );
}
return $return;
}
/**
* Software Name
@@ -186,11 +184,9 @@ class Vanilla extends Software
{
throw new \IPS\convert\Exception( sprintf( Member::loggedIn()->language()->get( 'could_not_count_rows' ), $table ) );
}
break;
default:
return parent::countRows( $table, $where, $recache );
break;
}
}
@@ -317,9 +313,9 @@ class Vanilla extends Software
/**
* Pre-process content for the Invision Community text parser
*
* @param string The post
* @param string|null Content Classname passed by post-conversion rebuild
* @param int|null Content ID passed by post-conversion rebuild
* @param string $post The post
* @param string|null $className Content Classname passed by post-conversion rebuild
* @param int|null $contentId Content ID passed by post-conversion rebuild
* @return string The converted post
*/
public static function fixPostData( string $post, ?string $className=null, ?int $contentId=null ): string
@@ -332,7 +328,7 @@ class Vanilla extends Software
*
* @return void
*/
public function convertAttachments()
public function convertAttachments(): void
{
$libraryClass = $this->getLibrary();
@@ -391,7 +387,7 @@ class Vanilla extends Software
*
* @return void
*/
public function convertForumsForums()
public function convertForumsForums(): void
{
$libraryClass = $this->getLibrary();
$libraryClass::setKey( 'c.CategoryID' );
@@ -433,7 +429,7 @@ class Vanilla extends Software
*
* @return void
*/
public function convertForumsTopics()
public function convertForumsTopics(): void
{
$libraryClass = $this->getLibrary();
$libraryClass::setKey( 'd.DiscussionID' );
@@ -469,12 +465,12 @@ class Vanilla extends Software
continue;
}
$row['DateLastComment'] = 0;
$row['LastCommentUserID'] = 0;
$row['LastCommentUserName'] = '';
$row['DateLastComment'] = $row['DateLastComment'] ?? 0;
$row['LastCommentUserID'] = $row['LastCommentUserID'] ?? 0;
$row['LastCommentUserName'] = $row['LastCommentUserName'] ?? '';
/* If last post info is empty, fetch it */
if( $row['DateLastComment'] === NULL )
if( !$row['DateLastComment'] )
{
try
{
@@ -542,7 +538,7 @@ class Vanilla extends Software
*
* @return void
*/
public function convertForumsPosts()
public function convertForumsPosts(): void
{
$libraryClass = $this->getLibrary();
$libraryClass::setKey( 'DiscussionID' );
@@ -634,7 +630,7 @@ class Vanilla extends Software
*
* @return void
*/
public function convertForumsPosts2()
public function convertForumsPosts2(): void
{
$libraryClass = $this->getLibrary();
$libraryClass::setKey( 'CommentID' );