aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB
diff options
context:
space:
mode:
author3D-I <marktravai@gmail.com>2018-11-12 22:41:42 +0100
committerMarc Alexander <admin@m-a-styles.de>2018-11-18 12:22:06 +0100
commitfcd916cc4f72e99d8b20d236e2e2c9fd79c37d00 (patch)
tree3f34432edf1878e02fdba8aade32b91830263523 /phpBB
parent97912d74e2f2e0e98662a590cc2e34ac929bd725 (diff)
downloadforums-fcd916cc4f72e99d8b20d236e2e2c9fd79c37d00.tar
forums-fcd916cc4f72e99d8b20d236e2e2c9fd79c37d00.tar.gz
forums-fcd916cc4f72e99d8b20d236e2e2c9fd79c37d00.tar.bz2
forums-fcd916cc4f72e99d8b20d236e2e2c9fd79c37d00.tar.xz
forums-fcd916cc4f72e99d8b20d236e2e2c9fd79c37d00.zip
[ticket/15873] Add core.mcp_report_template_data
PHPBB3-15873
Diffstat (limited to 'phpBB')
-rw-r--r--phpBB/includes/mcp/mcp_reports.php33
1 files changed, 31 insertions, 2 deletions
diff --git a/phpBB/includes/mcp/mcp_reports.php b/phpBB/includes/mcp/mcp_reports.php
index a1386e5d7e..b4018184a7 100644
--- a/phpBB/includes/mcp/mcp_reports.php
+++ b/phpBB/includes/mcp/mcp_reports.php
@@ -246,7 +246,10 @@ class mcp_reports
$parse_flags = ($post_info['user_sig_bbcode_bitfield'] ? OPTION_FLAG_BBCODE : 0) | OPTION_FLAG_SMILIES;
$post_info['user_sig'] = generate_text_for_display($post_info['user_sig'], $post_info['user_sig_bbcode_uid'], $post_info['user_sig_bbcode_bitfield'], $parse_flags, true);
- $template->assign_vars(array(
+ $topic_id = (int) $post_info['topic_id'];
+
+ // So it can be sent through the event below.
+ $report_template = array(
'S_MCP_REPORT' => true,
'S_CLOSE_ACTION' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=reports&amp;mode=report_details&amp;f=' . $post_info['forum_id'] . '&amp;p=' . $post_id),
'S_CAN_VIEWIP' => $auth->acl_get('m_info', $post_info['forum_id']),
@@ -298,7 +301,33 @@ class mcp_reports
'SIGNATURE' => $post_info['user_sig'],
'U_LOOKUP_IP' => ($auth->acl_get('m_info', $post_info['forum_id'])) ? $this->u_action . '&amp;r=' . $report_id . '&amp;p=' . $post_id . '&amp;f=' . $forum_id . '&amp;lookup=' . $post_info['poster_ip'] . '#ip' : '',
- ));
+ );
+
+ /**
+ * Event to add/modify MCP report details template data.
+ *
+ * @event core.mcp_report_template_data
+ * @var int forum_id The forum_id, the number in the f GET parameter
+ * @var int topic_id The topic_id of the report being viewed
+ * @var int post_id The post_id of the report being viewed (if 0, it is meaningless)
+ * @var int report_id The report_id of the report being viewed
+ * @var array report Array with the report data
+ * @var array report_template Array with the report template data
+ * @var array post_info Array with the reported post data
+ * @since 3.2.5-RC1
+ */
+ $vars = array(
+ 'forum_id',
+ 'topic_id',
+ 'post_id',
+ 'report_id',
+ 'report',
+ 'report_template',
+ 'post_info',
+ );
+ extract($phpbb_dispatcher->trigger_event('core.mcp_report_template_data', compact($vars)));
+
+ $template->assign_vars($report_template);
$this->tpl_name = 'mcp_post';