shawn
Well-known member
It's supposed to be fetching the soft deleted threads and changing their node, but it's fetching everything instead.
Code:
$threadModel = XenForo_Model::create('XenForo_Model_Thread');
$conditions = array(
'discussion_state' => 'deleted',
'forum_id' => $sourceForum,
);
$threads = $threadModel->getThreads($conditions, $fetchOptions);
if ($threads)
{
foreach ($threads as $thread)
{
$dw = XenForo_DataWriter::create('XenForo_DataWriter_Discussion_Thread');
$dw->setExistingData($thread);
$dw->set('node_id', $options->xefDestinationForum);
$dw->save();
}
}