1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-04-19 23:32:02 +02:00

Merge pull request #5399 from 3D-I/ticket/15826

[ticket/15826] Add core.mcp_main_fork_sql_after
This commit is contained in:
Marc Alexander 2018-10-27 22:35:42 +02:00
commit 628e5fbae6
No known key found for this signature in database
GPG Key ID: 50E0D2423696F995

View File

@ -1458,6 +1458,24 @@ function mcp_fork_topic($topic_ids)
$db->sql_query('INSERT INTO ' . POSTS_TABLE . ' ' . $db->sql_build_array('INSERT', $sql_ary));
$new_post_id = $db->sql_nextid();
/**
* Perform actions after forked topic is created.
*
* @event core.mcp_main_fork_sql_after
* @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 int new_post_id The newly created post ID
* @var array row Post data
* @since 3.2.4-RC1
*/
$vars = array(
'new_topic_id',
'to_forum_id',
'new_post_id',
'row',
);
extract($phpbb_dispatcher->trigger_event('core.mcp_main_fork_sql_after', compact($vars)));
switch ($row['post_visibility'])
{
case ITEM_APPROVED: