diff options
author | Marc Alexander <admin@m-a-styles.de> | 2017-12-28 10:43:27 +0100 |
---|---|---|
committer | Marc Alexander <admin@m-a-styles.de> | 2017-12-28 10:43:27 +0100 |
commit | 7c0ff6ddd4380a099af7d74e98c47ba95dd562be (patch) | |
tree | 7bf7b198e15335d396b2c53f55a1d1107cdad7d7 | |
parent | 0b5292312963b34e7943beacf17f559c168f868b (diff) | |
parent | b6ac183a32c54947b05aed23e514d6fe00f3fdd4 (diff) | |
download | forums-7c0ff6ddd4380a099af7d74e98c47ba95dd562be.tar forums-7c0ff6ddd4380a099af7d74e98c47ba95dd562be.tar.gz forums-7c0ff6ddd4380a099af7d74e98c47ba95dd562be.tar.bz2 forums-7c0ff6ddd4380a099af7d74e98c47ba95dd562be.tar.xz forums-7c0ff6ddd4380a099af7d74e98c47ba95dd562be.zip |
Merge pull request #5045 from senky/ticket/15454
[ticket/15454] Add core.mcp_queue_approve_details_template
-rw-r--r-- | phpBB/includes/mcp/mcp_queue.php | 32 |
1 files changed, 30 insertions, 2 deletions
diff --git a/phpBB/includes/mcp/mcp_queue.php b/phpBB/includes/mcp/mcp_queue.php index f379392b12..d489649649 100644 --- a/phpBB/includes/mcp/mcp_queue.php +++ b/phpBB/includes/mcp/mcp_queue.php @@ -280,7 +280,7 @@ class mcp_queue $post_url = append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $post_info['forum_id'] . '&p=' . $post_info['post_id'] . '#p' . $post_info['post_id']); $topic_url = append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $post_info['forum_id'] . '&t=' . $post_info['topic_id']); - $template->assign_vars(array( + $post_data = array( 'S_MCP_QUEUE' => true, 'U_APPROVE_ACTION' => append_sid("{$phpbb_root_path}mcp.$phpEx", "i=queue&p=$post_id&f=$forum_id"), 'S_CAN_DELETE_POST' => $auth->acl_get('m_delete', $post_info['forum_id']), @@ -324,7 +324,35 @@ class mcp_queue 'S_FIRST_POST' => ($post_info['topic_first_post_id'] == $post_id), 'U_LOOKUP_IP' => ($auth->acl_get('m_info', $post_info['forum_id'])) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=queue&mode=approve_details&f=' . $post_info['forum_id'] . '&p=' . $post_id . '&lookup=' . $post_info['poster_ip']) . '#ip' : '', - )); + ); + + /** + * Alter post awaiting approval template before it is rendered + * + * @event core.mcp_queue_approve_details_template + * @var int post_id Post ID + * @var int topic_id Topic ID + * @var array topic_info Topic data + * @var array post_info Post data + * @var array post_data Post template data + * @var string message Post message + * @var string post_url Post URL + * @var string topic_url Topic URL + * @since 3.2.2-RC1 + */ + $vars = array( + 'post_id', + 'topic_id', + 'topic_info', + 'post_info', + 'post_data', + 'message', + 'post_url', + 'topic_url', + ); + extract($phpbb_dispatcher->trigger_event('core.mcp_queue_approve_details_template', compact($vars))); + + $template->assign_vars($post_data); break; |