mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-08 04:18:52 +00:00
Merge pull request #4855 from dsinn/ticket/15250
[ticket/15250] Add core event to MCP at the end of merge_posts
This commit is contained in:
commit
689ebd3bb6
1 changed files with 15 additions and 1 deletions
|
@ -676,7 +676,7 @@ function split_topic($action, $topic_id, $to_forum_id, $subject)
|
||||||
*/
|
*/
|
||||||
function merge_posts($topic_id, $to_topic_id)
|
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)
|
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&t=$to_topic_id");
|
$redirect = request_var('redirect', "{$phpbb_root_path}viewtopic.$phpEx?f=$to_forum_id&t=$to_topic_id");
|
||||||
$redirect = reapply_sid($redirect);
|
$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);
|
meta_refresh(3, $redirect);
|
||||||
trigger_error($user->lang[$success_msg] . '<br /><br />' . $return_link);
|
trigger_error($user->lang[$success_msg] . '<br /><br />' . $return_link);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue