aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/acp/acp_forums.php
diff options
context:
space:
mode:
authorMarc Alexander <admin@m-a-styles.de>2015-07-22 10:30:58 +0200
committerMarc Alexander <admin@m-a-styles.de>2015-07-22 10:30:58 +0200
commitb635853479e006dd06c739e4f549f103d9b134a8 (patch)
tree85fff48f9abf35b361f08fe17fb9c869f7cf8b40 /phpBB/includes/acp/acp_forums.php
parentb3974ed0f694603eb59894cfa6a887a61dae4f8d (diff)
parente686f8bbdfee9eb9204274954690f4b4eccd2eb0 (diff)
downloadforums-b635853479e006dd06c739e4f549f103d9b134a8.tar
forums-b635853479e006dd06c739e4f549f103d9b134a8.tar.gz
forums-b635853479e006dd06c739e4f549f103d9b134a8.tar.bz2
forums-b635853479e006dd06c739e4f549f103d9b134a8.tar.xz
forums-b635853479e006dd06c739e4f549f103d9b134a8.zip
Merge branch '3.1.x'
Diffstat (limited to 'phpBB/includes/acp/acp_forums.php')
-rw-r--r--phpBB/includes/acp/acp_forums.php20
1 files changed, 19 insertions, 1 deletions
diff --git a/phpBB/includes/acp/acp_forums.php b/phpBB/includes/acp/acp_forums.php
index 0ba1c0c9fd..f252f2a594 100644
--- a/phpBB/includes/acp/acp_forums.php
+++ b/phpBB/includes/acp/acp_forums.php
@@ -1788,7 +1788,7 @@ class acp_forums
*/
function delete_forum_content($forum_id)
{
- global $db, $config, $phpbb_root_path, $phpEx;
+ global $db, $config, $phpbb_root_path, $phpEx, $phpbb_dispatcher;
include_once($phpbb_root_path . 'includes/functions_posting.' . $phpEx);
@@ -1920,6 +1920,24 @@ class acp_forums
$table_ary = array(FORUMS_ACCESS_TABLE, FORUMS_TRACK_TABLE, FORUMS_WATCH_TABLE, LOG_TABLE, MODERATOR_CACHE_TABLE, POSTS_TABLE, TOPICS_TABLE, TOPICS_TRACK_TABLE);
+ /**
+ * Perform additional actions before forum content deletion
+ *
+ * @event core.delete_forum_content_before_query
+ * @var array table_ary Array of tables from which all rows will be deleted that hold the forum_id
+ * @var int forum_id the forum id
+ * @var array topic_ids Array of the topic ids from the forum to be deleted
+ * @var array post_counts Array of counts of posts in the forum, by poster_id
+ * @since 3.1.6-RC1
+ */
+ $vars = array(
+ 'table_ary',
+ 'forum_id',
+ 'topic_ids',
+ 'post_counts',
+ );
+ extract($phpbb_dispatcher->trigger_event('core.delete_forum_content_before_query', compact($vars)));
+
foreach ($table_ary as $table)
{
$db->sql_query("DELETE FROM $table WHERE forum_id = $forum_id");