Version 4.7.0
This commit is contained in:
1 parent
517a5e1f70
commit
8ba7d43898
1933 files changed
+65613
-11332
No files matched your search
@@ -135,7 +135,7 @@ class _MoveComments
|
||||
public function getProgress( $data, $offset )
|
||||
{
|
||||
$database = \IPS\cms\Databases::load( $data['databaseId'] );
|
||||
return array( 'text' => \IPS\Member::loggedIn()->language()->addToStack( 'moving_database_comments', NULL, array( 'sprintf' => array( $database->_title ) ) ), 'complete' => $data['done'] ? ( round( 100 / $data['count'] * $data['done'], 2 ) ) : 0 );
|
||||
return array( 'text' => \IPS\Member::loggedIn()->language()->addToStack( 'moving_database_comments', FALSE, array( 'sprintf' => array( $database->_title ) ) ), 'complete' => $data['done'] ? ( round( 100 / $data['count'] * $data['done'], 2 ) ) : 0 );
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -168,11 +168,15 @@ class _MoveComments
|
||||
}
|
||||
|
||||
/* I'm not sure how to do this properly yet */
|
||||
$queued = 0;
|
||||
$queued = $row->approved;
|
||||
if ( $row->approved == 0 )
|
||||
{
|
||||
$queued = 1;
|
||||
}
|
||||
else if ( $row->approved == 1 )
|
||||
{
|
||||
$queued = 0;
|
||||
}
|
||||
else if ( $row->approved == -1 )
|
||||
{
|
||||
$queued = -1;
|
||||
@@ -191,7 +195,10 @@ class _MoveComments
|
||||
$post->edit_name = $row->edit_member_name;
|
||||
$post->post_edit_reason = $row->edit_reason ?: '';
|
||||
$post->save();
|
||||
|
||||
|
||||
/* Update post before register */
|
||||
\IPS\Db::i()->update( 'core_post_before_registering', array( 'class' => "\IPS\forums\Topic\Post", 'id' => $post->id ), array( 'class=? and id=?', $commentClass, $row->id ) );
|
||||
|
||||
\IPS\Content\Search\Index::i()->index( $post );
|
||||
|
||||
$data['lastId'] = $row->id;
|
||||
@@ -252,14 +259,14 @@ class _MoveComments
|
||||
{
|
||||
$record = $recordClass::load( $row->topic_id, 'record_topicid' );
|
||||
|
||||
$approved = 1;
|
||||
$approved = $row->queued;
|
||||
if ( $row->queued == 1 )
|
||||
{
|
||||
$approved = 0;
|
||||
}
|
||||
else if ( $row->queued == -1 )
|
||||
else if ( $row->queued == 0 )
|
||||
{
|
||||
$approved = -1;
|
||||
$approved = 1;
|
||||
}
|
||||
|
||||
$comment = new $commentClass;
|
||||
@@ -275,7 +282,10 @@ class _MoveComments
|
||||
$comment->edit_reason = $row->edit_reason;
|
||||
$comment->edit_member_name = $row->edit_name;
|
||||
$comment->save();
|
||||
|
||||
|
||||
/* Update post before register */
|
||||
\IPS\Db::i()->update( 'core_post_before_registering', array( 'class' => $commentClass, 'id' => $comment->id ), array( 'class=? and id=?', "\IPS\forums\Topic\Post", $row->id ) );
|
||||
|
||||
\IPS\Content\Search\Index::i()->index( $comment );
|
||||
|
||||
$row->delete();
|
||||
|
||||
Reference in new issue
Block a user