aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Sinn <daniel.p.sinn@gmail.com>2017-06-20 17:56:48 -0400
committerDaniel Sinn <daniel.p.sinn@gmail.com>2017-06-20 17:56:48 -0400
commit127f5a3ffad4c971973dc6a0691343d2e9f342a9 (patch)
tree9c760a4eff248f7438a56a05ae74faa05e54f17d
parent1c4f49249ffe8457914372b08b15056ad5d38085 (diff)
downloadforums-127f5a3ffad4c971973dc6a0691343d2e9f342a9.tar
forums-127f5a3ffad4c971973dc6a0691343d2e9f342a9.tar.gz
forums-127f5a3ffad4c971973dc6a0691343d2e9f342a9.tar.bz2
forums-127f5a3ffad4c971973dc6a0691343d2e9f342a9.tar.xz
forums-127f5a3ffad4c971973dc6a0691343d2e9f342a9.zip
[ticket/15250] Add core event to MCP at the end of merge_posts
PHPBB3-15250
-rw-r--r--phpBB/includes/mcp/mcp_topic.php16
1 files changed, 15 insertions, 1 deletions
diff --git a/phpBB/includes/mcp/mcp_topic.php b/phpBB/includes/mcp/mcp_topic.php
index 7dbe7787cb..d5415302c8 100644
--- a/phpBB/includes/mcp/mcp_topic.php
+++ b/phpBB/includes/mcp/mcp_topic.php
@@ -676,7 +676,7 @@ function split_topic($action, $topic_id, $to_forum_id, $subject)
*/
function merge_posts($topic_id, $to_topic_id)
{
- global $db, $template, $user, $phpEx, $phpbb_root_path, $auth;
+ global $db, $template, $user, $phpEx, $phpbb_root_path, $auth, $phpbb_dispatcher;
if (!$to_topic_id)
{
@@ -777,6 +777,20 @@ function merge_posts($topic_id, $to_topic_id)
$redirect = request_var('redirect', "{$phpbb_root_path}viewtopic.$phpEx?f=$to_forum_id&amp;t=$to_topic_id");
$redirect = reapply_sid($redirect);
+ /**
+ * Perform additional actions after merging posts.
+ *
+ * @event core.mcp_topics_merge_posts_after
+ * @var int topic_id The topic ID from which posts are being moved
+ * @var int to_topic_id The topic ID to which posts are being moved
+ * @since 3.1.11-RC1
+ */
+ $vars = array(
+ 'topic_id',
+ 'to_topic_id',
+ );
+ extract($phpbb_dispatcher->trigger_event('core.mcp_topics_merge_posts_after', compact($vars)));
+
meta_refresh(3, $redirect);
trigger_error($user->lang[$success_msg] . '<br /><br />' . $return_link);
}