diff options
author | javiexin <javiexin@gmail.com> | 2017-02-10 14:41:42 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-02-10 14:41:42 +0100 |
commit | fc50fd272b9685221e130114b2365b23bd543048 (patch) | |
tree | 94e95ddbc792d66ecd508f8db7293f76801f6caf /phpBB/includes/mcp/mcp_main.php | |
parent | 09f6637597fff1dcdfc6117067c1f758fa23f60d (diff) | |
parent | 1470985ff20197589cbbab96180d80b0148d20d5 (diff) | |
download | forums-fc50fd272b9685221e130114b2365b23bd543048.tar forums-fc50fd272b9685221e130114b2365b23bd543048.tar.gz forums-fc50fd272b9685221e130114b2365b23bd543048.tar.bz2 forums-fc50fd272b9685221e130114b2365b23bd543048.tar.xz forums-fc50fd272b9685221e130114b2365b23bd543048.zip |
Merge branch '3.1.x' into ticket/15081
Diffstat (limited to 'phpBB/includes/mcp/mcp_main.php')
-rw-r--r-- | phpBB/includes/mcp/mcp_main.php | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/phpBB/includes/mcp/mcp_main.php b/phpBB/includes/mcp/mcp_main.php index b2441aed1b..599bd5d918 100644 --- a/phpBB/includes/mcp/mcp_main.php +++ b/phpBB/includes/mcp/mcp_main.php @@ -463,7 +463,7 @@ function change_topic_type($action, $topic_ids) */ function mcp_move_topic($topic_ids) { - global $auth, $user, $db, $template, $phpbb_log, $request; + global $auth, $user, $db, $template, $phpbb_log, $request, $phpbb_dispatcher; global $phpEx, $phpbb_root_path; // Here we limit the operation to one forum only @@ -625,6 +625,18 @@ function mcp_move_topic($topic_ids) 'poll_last_vote' => (int) $row['poll_last_vote'] ); + /** + * Perform actions before shadow topic is created. + * + * @event core.mcp_main_modify_shadow_sql + * @var array shadow SQL array to be used by $db->sql_build_array + * @since 3.1.11-RC1 + */ + $vars = array( + 'shadow', + ); + extract($phpbb_dispatcher->trigger_event('core.mcp_main_modify_shadow_sql', compact($vars))); + $db->sql_query('INSERT INTO ' . TOPICS_TABLE . $db->sql_build_array('INSERT', $shadow)); // Shadow topics only count on new "topics" and not posts... a shadow topic alone has 0 posts @@ -1281,6 +1293,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; |