diff options
author | 3D-I <marktravai@gmail.com> | 2018-10-02 05:59:25 +0200 |
---|---|---|
committer | 3D-I <marktravai@gmail.com> | 2018-10-02 05:59:25 +0200 |
commit | 710760b9e460347d3712ca3593295fbf0fb92ec9 (patch) | |
tree | 6819c216bea933010a959c072459adb880333245 /phpBB/includes/mcp | |
parent | 001f32da95d4f8697ccc9a6107afc8dc68cbe48e (diff) | |
download | forums-710760b9e460347d3712ca3593295fbf0fb92ec9.tar forums-710760b9e460347d3712ca3593295fbf0fb92ec9.tar.gz forums-710760b9e460347d3712ca3593295fbf0fb92ec9.tar.bz2 forums-710760b9e460347d3712ca3593295fbf0fb92ec9.tar.xz forums-710760b9e460347d3712ca3593295fbf0fb92ec9.zip |
[ticket/15826] Add core.mcp_main_fork_sql_after
PHPBB3-15826
Diffstat (limited to 'phpBB/includes/mcp')
-rw-r--r-- | phpBB/includes/mcp/mcp_main.php | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/phpBB/includes/mcp/mcp_main.php b/phpBB/includes/mcp/mcp_main.php index 2133bd9a19..86257798f4 100644 --- a/phpBB/includes/mcp/mcp_main.php +++ b/phpBB/includes/mcp/mcp_main.php @@ -1458,6 +1458,22 @@ 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 + * @since 3.2.4-RC1 + */ + $vars = array( + 'new_topic_id', + 'to_forum_id', + 'new_post_id', + ); + extract($phpbb_dispatcher->trigger_event('core.mcp_main_fork_sql_after', compact($vars))); + switch ($row['post_visibility']) { case ITEM_APPROVED: |