1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-30 21:40:43 +02:00

Merge branch '3.3.x'

This commit is contained in:
Marc Alexander
2021-05-15 22:38:08 +02:00
3 changed files with 147 additions and 18 deletions

View File

@@ -1565,6 +1565,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.3.5-RC1
*/
$vars = [
'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 = (int) $db->sql_nextid();