Version 4.7.6
This commit is contained in:
1 parent
8ba7d43898
commit
7b7404e741
1085 files changed
+30590
-7837
No files matched your search
@@ -161,10 +161,24 @@ class _MoveComments
|
||||
}
|
||||
foreach( new \IPS\Patterns\ActiveRecordIterator( \IPS\Db::i()->select( '*', 'cms_database_comments', $where, "comment_id ASC", $this->rebuild ), $commentClass ) AS $row )
|
||||
{
|
||||
/* First, create the topic if it doesn't already exist */
|
||||
if ( !$row->item()->record_topicid )
|
||||
/* Check the record exists */
|
||||
try
|
||||
{
|
||||
$row->item()->syncTopic( FALSE ); # Sync Topic will create it for us and link it, while also handling database and category level settings.
|
||||
$row->item();
|
||||
|
||||
/* First, create the topic if it doesn't already exist */
|
||||
if ( !$row->item()->record_topicid )
|
||||
{
|
||||
$row->item()->syncTopic( FALSE ); # Sync Topic will create it for us and link it, while also handling database and category level settings.
|
||||
}
|
||||
}
|
||||
// Exception may be that the item does not exist, or the category does not have syncing enabled
|
||||
catch( \UnderflowException | \OutOfRangeException $e )
|
||||
{
|
||||
$data['lastId'] = $row->id;
|
||||
$data['done']++;
|
||||
$done++;
|
||||
continue;
|
||||
}
|
||||
|
||||
/* I'm not sure how to do this properly yet */
|
||||
|
||||
Reference in new issue
Block a user