Version 5.0.0 beta 4

This commit is contained in:
Neo committed 2025-12-19 16:57:00 -08:00
1 parent e86153356a
commit 2f24f9de48
276 files changed
+8614 -6044

No files matched your search

@@ -45,12 +45,12 @@ class Invisioncommunity extends Software
/**
* @brief Whether the versions of IPS4 match
*/
public static $versionMatch = FALSE;
public static bool $versionMatch = FALSE;
/**
* @brief Whether the database has been required
*/
public static $dbNeeded = FALSE;
public static bool $dbNeeded = FALSE;
/**
* Constructor
@@ -60,12 +60,12 @@ class Invisioncommunity extends Software
* @return void
* @throws InvalidArgumentException
*/
public function __construct( App $app, $needDB = TRUE )
public function __construct( App $app, bool $needDB = TRUE )
{
/* Set filename obscuring flag */
Library::$obscureFilenames = FALSE;
$return = parent::__construct( $app, $needDB );
parent::__construct( $app, $needDB );
if ( $needDB )
{
@@ -86,8 +86,6 @@ class Invisioncommunity extends Software
/* Get parent sauce */
$this->parent = $this->app->_parent->getSource();
}
return $return;
}
/**
@@ -95,7 +93,7 @@ class Invisioncommunity extends Software
*
* @return string
*/
public static function softwareName()
public static function softwareName(): string
{
/* Child classes must override this method */
return 'Invision Community (' . Application::load( 'core' )->version . ')';
@@ -106,7 +104,7 @@ class Invisioncommunity extends Software
*
* @return string
*/
public static function softwareKey()
public static function softwareKey(): string
{
/* Child classes must override this method */
return "invisioncommunity";
@@ -115,9 +113,9 @@ class Invisioncommunity extends Software
/**
* Content we can convert from this software.
*
* @return array
* @return array|null
*/
public static function canConvert()
public static function canConvert(): ?array
{
if ( !static::$versionMatch and static::$dbNeeded )
{
@@ -157,7 +155,7 @@ class Invisioncommunity extends Software
*
* @return boolean
*/
public static function requiresParent()
public static function requiresParent(): bool
{
return TRUE;
}
@@ -165,9 +163,9 @@ class Invisioncommunity extends Software
/**
* Possible Parent Conversions
*
* @return array
* @return array|null
*/
public static function parents()
public static function parents(): ?array
{
return array( 'core' => array( 'invisioncommunity' ) );
}
@@ -177,7 +175,7 @@ class Invisioncommunity extends Software
*
* @return array
*/
public static function checkConf()
public static function checkConf(): array
{
return array(
'convertAttachments',
@@ -188,9 +186,9 @@ class Invisioncommunity extends Software
/**
* Finish
*
* @return array Messages to display
* @return array Messages to display
*/
public function finish()
public function finish(): array
{
Task::queue( 'core', 'RebuildItemCounts', array( 'class' => 'IPS\downloads\File', 'count' => 0 ), 4, array( 'class' ) );
Task::queue( 'core', 'RebuildContainerCounts', array( 'class' => 'IPS\downloads\Category', 'count' => 0 ), 5, array( 'class' ) );
@@ -206,7 +204,7 @@ class Invisioncommunity extends Software
*
* @return void
*/
public function convertAttachments()
public function convertAttachments() : void
{
$libraryClass = $this->getLibrary();
$libraryClass::setKey( 'attach_id' );
@@ -247,9 +245,9 @@ class Invisioncommunity extends Software
* Get More Information
*
* @param string $method Method name
* @return array
* @return array|null
*/
public function getMoreInfo( $method )
public function getMoreInfo( string $method ): ?array
{
$return = array();
@@ -262,7 +260,7 @@ class Invisioncommunity extends Software
$return[ $method ] = array(
'upload_path' => array(
'field_class' => 'IPS\\Helpers\\Form\\Text',
'field_default' => isset( $this->parent->app->_session['more_info']['convertEmoticons']['upload_path'] ) ? $this->parent->app->_session['more_info']['convertEmoticons']['upload_path'] : NULL,
'field_default' => $this->parent->app->_session['more_info']['convertEmoticons']['upload_path'] ?? NULL,
'field_required' => TRUE,
'field_extra' => array(),
'field_hint' => Member::loggedIn()->language()->addToStack( 'convert_invision_upload_path' ),
@@ -285,7 +283,7 @@ class Invisioncommunity extends Software
*
* @return void
*/
public function convertDownloadsCategories()
public function convertDownloadsCategories() : void
{
$libraryClass = $this->getLibrary();
$libraryClass::setKey( 'cid' );
@@ -325,7 +323,7 @@ class Invisioncommunity extends Software
*
* @return void
*/
public function convertDownloadsCfields()
public function convertDownloadsCfields() : void
{
$libraryClass = $this->getLibrary();
$libraryClass::setKey( 'cf_id' );
@@ -349,7 +347,7 @@ class Invisioncommunity extends Software
*
* @return void
*/
public function convertDownloadsComments()
public function convertDownloadsComments() : void
{
$libraryClass = $this->getLibrary();
$libraryClass::setKey( 'comment_id' );
@@ -382,7 +380,7 @@ class Invisioncommunity extends Software
*
* @return void
*/
public function convertDownloadsFiles()
public function convertDownloadsFiles() : void
{
$libraryClass = $this->getLibrary();
$libraryClass::setKey( 'file_id' );
@@ -445,7 +443,7 @@ class Invisioncommunity extends Software
*
* @return void
*/
public function convertDownloadsReviews()
public function convertDownloadsReviews() : void
{
$libraryClass = $this->getLibrary();
$libraryClass::setKey( 'comment_id' );
@@ -476,9 +474,9 @@ class Invisioncommunity extends Software
/**
* Check if we can redirect the legacy URLs from this software to the new locations
*
* @return NULL|Url
* @return Url|NULL
*/
public function checkRedirects()
public function checkRedirects(): ?Url
{
$url = Request::i()->url();