1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-03-22 00:21:02 +01:00

Merge branch '3.1.x' into 3.2.x

This commit is contained in:
Marc Alexander 2017-04-26 19:58:29 -04:00
commit 8179e56b02
No known key found for this signature in database
GPG Key ID: 50E0D2423696F995

View File

@ -1165,7 +1165,7 @@ function topic_review($topic_id, $forum_id, $mode = 'topic_review', $cur_post_id
*/
function delete_post($forum_id, $topic_id, $post_id, &$data, $is_soft = false, $softdelete_reason = '')
{
global $db, $user, $phpbb_container;
global $db, $user, $phpbb_container, $phpbb_dispatcher;
global $config, $phpEx, $phpbb_root_path;
// Specify our post mode
@ -1416,6 +1416,34 @@ function delete_post($forum_id, $topic_id, $post_id, &$data, $is_soft = false, $
sync('topic_reported', 'topic_id', array($topic_id));
}
/**
* This event is used for performing actions directly after a post or topic
* has been deleted.
*
* @event core.delete_post_after
* @var int forum_id Post forum ID
* @var int topic_id Post topic ID
* @var int post_id Post ID
* @var array data Post data
* @var bool is_soft Soft delete flag
* @var string softdelete_reason Soft delete reason
* @var string post_mode delete_topic, delete_first_post, delete_last_post or delete
* @var mixed next_post_id Next post ID in the topic (post ID or false)
*
* @since 3.1.11-RC1
*/
$vars = array(
'forum_id',
'topic_id',
'post_id',
'data',
'is_soft',
'softdelete_reason',
'post_mode',
'next_post_id',
);
extract($phpbb_dispatcher->trigger_event('core.delete_post_after', compact($vars)));
return $next_post_id;
}