1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-03-20 23:51:28 +01:00

[ticket/14760] Add core.mcp_main_modify_fork_sql event

PHPBB3-14760
This commit is contained in:
Jakub Senko 2016-11-13 17:44:22 +01:00
parent 372324cead
commit 114cfe2c27

View File

@ -1281,6 +1281,18 @@ function mcp_fork_topic($topic_ids)
'poll_vote_change' => (int) $topic_row['poll_vote_change'],
);
/**
* Perform actions before forked topic is created.
*
* @event core.mcp_main_modify_fork_sql
* @var array sql_ary SQL array to be used by $db->sql_build_array
* @since 3.1.11-RC1
*/
$vars = array(
'sql_ary',
);
extract($phpbb_dispatcher->trigger_event('core.mcp_main_modify_fork_sql', compact($vars)));
$db->sql_query('INSERT INTO ' . TOPICS_TABLE . ' ' . $db->sql_build_array('INSERT', $sql_ary));
$new_topic_id = $db->sql_nextid();
$new_topic_id_list[$topic_id] = $new_topic_id;