diff --git a/phpBB/includes/mcp/mcp_main.php b/phpBB/includes/mcp/mcp_main.php index 9cf4ca9c96..a3fa0b20d9 100644 --- a/phpBB/includes/mcp/mcp_main.php +++ b/phpBB/includes/mcp/mcp_main.php @@ -1563,6 +1563,26 @@ function mcp_fork_topic($topic_ids) $counter[$row['poster_id']] = 1; } } + + /** + * Modify the forked post's sql array before it's inserted into the database. + * + * @event core.mcp_main_modify_fork_post_sql + * @var int new_topic_id The newly created topic ID + * @var int to_forum_id The forum ID where the forked topic has been moved to + * @var array sql_ary SQL Array with the post's data + * @var array row Post data + * @var array counter Array with post counts + * @since 3.2.6-RC1 + */ + $vars = array( + 'new_topic_id', + 'to_forum_id', + 'sql_ary', + 'row', + 'counter', + ); + extract($phpbb_dispatcher->trigger_event('core.mcp_main_modify_fork_post_sql', compact($vars))); $db->sql_query('INSERT INTO ' . POSTS_TABLE . ' ' . $db->sql_build_array('INSERT', $sql_ary)); $new_post_id = $db->sql_nextid();