aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes
diff options
context:
space:
mode:
authorMarc Alexander <admin@m-a-styles.de>2019-04-07 11:41:48 +0200
committerMarc Alexander <admin@m-a-styles.de>2019-04-07 11:41:48 +0200
commitf51ef14e44c78116e2196cf2362cb73f9566ece8 (patch)
treedfe2ec123488d627eaa37b8a379782a9560fc149 /phpBB/includes
parent29abad3dd409d5d81c4566b4f083508c6b9f634d (diff)
parent6921565efe4674c51eb08326313cfca3349eedd5 (diff)
downloadforums-f51ef14e44c78116e2196cf2362cb73f9566ece8.tar
forums-f51ef14e44c78116e2196cf2362cb73f9566ece8.tar.gz
forums-f51ef14e44c78116e2196cf2362cb73f9566ece8.tar.bz2
forums-f51ef14e44c78116e2196cf2362cb73f9566ece8.tar.xz
forums-f51ef14e44c78116e2196cf2362cb73f9566ece8.zip
Merge pull request #5518 from 3D-I/ticket/15948
[ticket/15948] Add core.mcp_change_topic_type_after/before
Diffstat (limited to 'phpBB/includes')
-rw-r--r--phpBB/includes/mcp/mcp_main.php33
1 files changed, 33 insertions, 0 deletions
diff --git a/phpBB/includes/mcp/mcp_main.php b/phpBB/includes/mcp/mcp_main.php
index d20878a279..065e9bba12 100644
--- a/phpBB/includes/mcp/mcp_main.php
+++ b/phpBB/includes/mcp/mcp_main.php
@@ -426,6 +426,23 @@ function change_topic_type($action, $topic_ids)
if (confirm_box(true))
{
+
+ /**
+ * Perform additional actions before changing topic(s) type
+ *
+ * @event core.mcp_change_topic_type_before
+ * @var int new_topic_type The candidated topic type.
+ * @var int forum_id The forum ID for the topic ID(s).
+ * @var array topic_ids Array containing the topic ID(s) that will be changed
+ * @since 3.2.6-RC1
+ */
+ $vars = array(
+ 'new_topic_type',
+ 'forum_id',
+ 'topic_ids',
+ );
+ extract($phpbb_dispatcher->trigger_event('core.mcp_change_topic_type_before', compact($vars)));
+
$db->sql_transaction('begin');
$sql = 'UPDATE ' . TOPICS_TABLE . "
@@ -459,6 +476,22 @@ function change_topic_type($action, $topic_ids)
}
}
+ /**
+ * Perform additional actions after changing topic types
+ *
+ * @event core.mcp_change_topic_type_after
+ * @var int new_topic_type The newly changed topic type.
+ * @var int forum_id The forum ID where the newly changed topic type belongs to.
+ * @var array topic_ids Array containing the topic IDs that have been changed
+ * @since 3.2.6-RC1
+ */
+ $vars = array(
+ 'new_topic_type',
+ 'forum_id',
+ 'topic_ids',
+ );
+ extract($phpbb_dispatcher->trigger_event('core.mcp_change_topic_type_after', compact($vars)));
+
meta_refresh(2, $redirect);
$message = $user->lang[$success_msg];