aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes
diff options
context:
space:
mode:
authorJakub Senko <jakubsenko@gmail.com>2016-11-13 17:48:53 +0100
committerJakub Senko <jakubsenko@gmail.com>2016-11-13 17:48:53 +0100
commit36d4169768693b318fdda0e7f6dee2a1df6ed355 (patch)
tree2ae61bcaba68a133b20117d343c3da3a20e4b0d4 /phpBB/includes
parent372324cead4f9068ebe3ca10c85858af833a8026 (diff)
downloadforums-36d4169768693b318fdda0e7f6dee2a1df6ed355.tar
forums-36d4169768693b318fdda0e7f6dee2a1df6ed355.tar.gz
forums-36d4169768693b318fdda0e7f6dee2a1df6ed355.tar.bz2
forums-36d4169768693b318fdda0e7f6dee2a1df6ed355.tar.xz
forums-36d4169768693b318fdda0e7f6dee2a1df6ed355.zip
[ticket/14759] Add core.mcp_main_modify_shadow_sql event
PHPBB3-14759
Diffstat (limited to 'phpBB/includes')
-rw-r--r--phpBB/includes/mcp/mcp_main.php14
1 files changed, 13 insertions, 1 deletions
diff --git a/phpBB/includes/mcp/mcp_main.php b/phpBB/includes/mcp/mcp_main.php
index b2441aed1b..1e4a0a8850 100644
--- a/phpBB/includes/mcp/mcp_main.php
+++ b/phpBB/includes/mcp/mcp_main.php
@@ -463,7 +463,7 @@ function change_topic_type($action, $topic_ids)
*/
function mcp_move_topic($topic_ids)
{
- global $auth, $user, $db, $template, $phpbb_log, $request;
+ global $auth, $user, $db, $template, $phpbb_log, $request, $phpbb_dispatcher;
global $phpEx, $phpbb_root_path;
// Here we limit the operation to one forum only
@@ -625,6 +625,18 @@ function mcp_move_topic($topic_ids)
'poll_last_vote' => (int) $row['poll_last_vote']
);
+ /**
+ * Perform actions before shadow topic is created.
+ *
+ * @event core.mcp_main_modify_shadow_sql
+ * @var array shadow SQL array to be used by $db->sql_build_array
+ * @since 3.1.11-RC1
+ */
+ $vars = array(
+ 'shadow',
+ );
+ extract($phpbb_dispatcher->trigger_event('core.mcp_main_modify_shadow_sql', compact($vars)));
+
$db->sql_query('INSERT INTO ' . TOPICS_TABLE . $db->sql_build_array('INSERT', $shadow));
// Shadow topics only count on new "topics" and not posts... a shadow topic alone has 0 posts