aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/functions_posting.php
diff options
context:
space:
mode:
authorJakub Senko <jakubsenko@gmail.com>2017-01-23 14:43:28 +0100
committerJakub Senko <jakubsenko@gmail.com>2017-02-08 13:18:23 +0100
commit0ea839e595ce170d17d1861eab1bbc51f1640b3a (patch)
tree4e983057871ed6462f5789fe14fd4180b5339ba8 /phpBB/includes/functions_posting.php
parent2d742beb9245fdc215b9d53b846b15d608bd99e4 (diff)
downloadforums-0ea839e595ce170d17d1861eab1bbc51f1640b3a.tar
forums-0ea839e595ce170d17d1861eab1bbc51f1640b3a.tar.gz
forums-0ea839e595ce170d17d1861eab1bbc51f1640b3a.tar.bz2
forums-0ea839e595ce170d17d1861eab1bbc51f1640b3a.tar.xz
forums-0ea839e595ce170d17d1861eab1bbc51f1640b3a.zip
[ticket/13730] Add core.delete_post_after event
PHPBB3-13730
Diffstat (limited to 'phpBB/includes/functions_posting.php')
-rw-r--r--phpBB/includes/functions_posting.php30
1 files changed, 29 insertions, 1 deletions
diff --git a/phpBB/includes/functions_posting.php b/phpBB/includes/functions_posting.php
index 30f5ba91ef..aaa5ef80b1 100644
--- a/phpBB/includes/functions_posting.php
+++ b/phpBB/includes/functions_posting.php
@@ -1315,7 +1315,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, $auth, $phpbb_container;
+ global $db, $user, $auth, $phpbb_container, $phpbb_dispatcher;
global $config, $phpEx, $phpbb_root_path;
// Specify our post mode
@@ -1566,6 +1566,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;
}