Version 5.0.0 beta 7
This commit is contained in:
1 parent
fa2a720105
commit
54d5dcd0a0
156 files changed
+4337
-2995
No files matched your search
@@ -22,6 +22,7 @@ use IPS\convert\App;
|
||||
use IPS\convert\Library;
|
||||
use IPS\convert\Software;
|
||||
use IPS\Db;
|
||||
use IPS\Db\Exception as DbException;
|
||||
use IPS\Http\Url;
|
||||
use IPS\Member;
|
||||
use IPS\Node\Model;
|
||||
@@ -46,12 +47,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
|
||||
@@ -61,12 +62,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 )
|
||||
{
|
||||
@@ -82,13 +83,11 @@ class Invisioncommunity extends Software
|
||||
static::$versionMatch = TRUE;
|
||||
}
|
||||
}
|
||||
catch( \IPS\Db\Exception $e ) {}
|
||||
catch( DbException $e ) {}
|
||||
|
||||
/* Get parent sauce */
|
||||
$this->parent = $this->app->_parent->getSource();
|
||||
}
|
||||
|
||||
return $return;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -181,17 +180,15 @@ class Invisioncommunity extends Software
|
||||
case 'core_rss_imported':
|
||||
try
|
||||
{
|
||||
return $this->db->select( 'COUNT(*)', 'core_rss_imported', array( 'rss_imported_import_id IN(' . (string) $this->db->select( 'rss_import_id', 'core_rss_import', array( "rss_import_class='IPS\\forums\\Topic'" ) ) . ')' ) )->first();
|
||||
return $this->db->select( 'COUNT(*)', 'core_rss_imported', array( 'rss_imported_import_id IN(' . $this->db->select( 'rss_import_id', 'core_rss_import', array( "rss_import_class='IPS\\forums\\Topic'" ) ) . ')' ) )->first();
|
||||
}
|
||||
catch( Exception $e )
|
||||
{
|
||||
throw new \IPS\convert\Exception( sprintf( Member::loggedIn()->language()->get( 'could_not_count_rows' ), $table ) );
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
return parent::countRows( $table, $where, $recache );
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -235,7 +232,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'),
|
||||
@@ -287,7 +284,7 @@ class Invisioncommunity extends Software
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function convertForumsAnswerRatings()
|
||||
public function convertForumsAnswerRatings() : void
|
||||
{
|
||||
$libraryClass = $this->getLibrary();
|
||||
$libraryClass::setKey( 'id' );
|
||||
@@ -307,7 +304,7 @@ class Invisioncommunity extends Software
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function convertForumsForums()
|
||||
public function convertForumsForums() : void
|
||||
{
|
||||
$libraryClass = $this->getLibrary();
|
||||
$libraryClass::setKey( 'id' );
|
||||
@@ -348,7 +345,7 @@ class Invisioncommunity extends Software
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function convertForumsTopics()
|
||||
public function convertForumsTopics() : void
|
||||
{
|
||||
$libraryClass = $this->getLibrary();
|
||||
$libraryClass::setKey( 'tid' );
|
||||
@@ -402,7 +399,7 @@ class Invisioncommunity extends Software
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function convertForumsPosts()
|
||||
public function convertForumsPosts() : void
|
||||
{
|
||||
$libraryClass = $this->getLibrary();
|
||||
$libraryClass::setKey( 'pid' );
|
||||
@@ -445,7 +442,7 @@ class Invisioncommunity extends Software
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function convertForumsQuestionRatings()
|
||||
public function convertForumsQuestionRatings() : void
|
||||
{
|
||||
$libraryClass = $this->getLibrary();
|
||||
$libraryClass::setKey( 'id' );
|
||||
@@ -465,7 +462,7 @@ class Invisioncommunity extends Software
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function convertForumsTopicsMultimods()
|
||||
public function convertForumsTopicsMultimods() : void
|
||||
{
|
||||
$libraryClass = $this->getLibrary();
|
||||
$libraryClass::setKey( 'mm_id' );
|
||||
@@ -488,7 +485,7 @@ class Invisioncommunity extends Software
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function convertForumsRssImports()
|
||||
public function convertForumsRssImports() : void
|
||||
{
|
||||
$libraryClass = $this->getLibrary();
|
||||
$libraryClass::setKey( 'rss_import_id' );
|
||||
@@ -511,11 +508,11 @@ class Invisioncommunity extends Software
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function convertForumsRssImported()
|
||||
public function convertForumsRssImported() : void
|
||||
{
|
||||
$libraryClass = $this->getLibrary();
|
||||
|
||||
foreach( $this->fetch( 'core_rss_imported', 'rss_imported_content_id', array( 'rss_imported_id IN(' . (string) Db::i()->select( 'rss_import_id', 'core_rss_import', array( "rss_import_class='IPS\\forums\\Topic'" ) ) . ')' ) ) AS $row )
|
||||
foreach( $this->fetch( 'core_rss_imported', 'rss_imported_content_id', array( 'rss_imported_id IN(' . Db::i()->select( 'rss_import_id', 'core_rss_import', array( "rss_import_class='IPS\\forums\\Topic'" ) ) . ')' ) ) AS $row )
|
||||
{
|
||||
/* Remove non-standard columns */
|
||||
$this->parent->unsetNonStandardColumns( $row, 'core_rss_imported', 'core' );
|
||||
@@ -529,7 +526,7 @@ class Invisioncommunity extends Software
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function convertAttachments()
|
||||
public function convertAttachments() : void
|
||||
{
|
||||
$libraryClass = $this->getLibrary();
|
||||
$libraryClass::setKey( 'attach_id' );
|
||||
|
||||
Reference in new issue
Block a user