aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/includes')
-rw-r--r--phpBB/includes/functions.php12
-rw-r--r--phpBB/includes/functions_content.php30
-rw-r--r--phpBB/includes/mcp/mcp_queue.php4
3 files changed, 43 insertions, 3 deletions
diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php
index a502314ded..7700dcfd27 100644
--- a/phpBB/includes/functions.php
+++ b/phpBB/includes/functions.php
@@ -5290,6 +5290,18 @@ function page_footer($run_cron = true, $display_template = true, $exit_handler =
}
}
+ /**
+ * Execute code and/or modify output before displaying the template.
+ *
+ * @event core.page_footer_after
+ * @var bool display_template Whether or not to display the template
+ * @var bool exit_handler Whether or not to run the exit_handler()
+ *
+ * @since 3.1.0-RC5
+ */
+ $vars = array('display_template', 'exit_handler');
+ extract($phpbb_dispatcher->trigger_event('core.page_footer_after', compact($vars)));
+
if ($display_template)
{
$template->display('body');
diff --git a/phpBB/includes/functions_content.php b/phpBB/includes/functions_content.php
index f275ed1dd1..25ca50e8f1 100644
--- a/phpBB/includes/functions_content.php
+++ b/phpBB/includes/functions_content.php
@@ -912,7 +912,7 @@ function parse_attachments($forum_id, &$message, &$attachments, &$update_count,
return;
}
- global $template, $cache, $user;
+ global $template, $cache, $user, $phpbb_dispatcher;
global $extensions, $config, $phpbb_root_path, $phpEx;
//
@@ -1187,6 +1187,34 @@ function parse_attachments($forum_id, &$message, &$attachments, &$update_count,
);
}
+ /**
+ * Use this event to modify the attachment template data.
+ *
+ * This event is triggered once per attachment.
+ *
+ * @event core.parse_attachments_modify_template_data
+ * @var array attachment Array with attachment data
+ * @var array block_array Template data of the attachment
+ * @var int display_cat Attachment category data
+ * @var string download_link Attachment download link
+ * @var array extensions Array with attachment extensions data
+ * @var mixed forum_id The forum id the attachments are displayed in (false if in private message)
+ * @var bool preview Flag indicating if we are in post preview mode
+ * @var array update_count Array with attachment ids to update download count
+ * @since 3.1.0-RC5
+ */
+ $vars = array(
+ 'attachment',
+ 'block_array',
+ 'display_cat',
+ 'download_link',
+ 'extensions',
+ 'forum_id',
+ 'preview',
+ 'update_count',
+ );
+ extract($phpbb_dispatcher->trigger_event('core.parse_attachments_modify_template_data', compact($vars)));
+
$template->assign_block_vars('_file', $block_array);
$compiled_attachments[] = $template->assign_display('attachment_tpl');
diff --git a/phpBB/includes/mcp/mcp_queue.php b/phpBB/includes/mcp/mcp_queue.php
index bfd30a5be2..f9c00da3ec 100644
--- a/phpBB/includes/mcp/mcp_queue.php
+++ b/phpBB/includes/mcp/mcp_queue.php
@@ -745,11 +745,11 @@ class mcp_queue
if (!$post_data['topic_posts_approved'])
{
- $phpbb_notifications->add_notifications('notification.type.approve_post', $post_data);
+ $phpbb_notifications->add_notifications('notification.type.approve_topic', $post_data);
}
else
{
- $phpbb_notifications->add_notifications('notification.type.approve_topic', $post_data);
+ $phpbb_notifications->add_notifications('notification.type.approve_post', $post_data);
}
}
}