From cd85541e1922a4c5ab492ed85259f6e066160bd9 Mon Sep 17 00:00:00 2001 From: kasimi Date: Fri, 17 Apr 2020 16:03:51 +0200 Subject: [PATCH 1/2] [ticket/16448] Add event core.mcp_get_post_data_after PHPBB3-16448 --- phpBB/includes/functions_mcp.php | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/phpBB/includes/functions_mcp.php b/phpBB/includes/functions_mcp.php index 75e24618de..2c198e54df 100644 --- a/phpBB/includes/functions_mcp.php +++ b/phpBB/includes/functions_mcp.php @@ -265,6 +265,25 @@ function phpbb_get_post_data($post_ids, $acl_list = false, $read_tracking = fals } $db->sql_freeresult($result); + /** + * This event allows you to modify post data displayed in the MCP + * + * @event core.mcp_get_post_data_after + * @var array post_ids Array with post ids that have been fetched + * @var mixed acl_list Either false or an array with permission strings to check + * @var bool read_tracking Whether or not to take last mark read time into account + * @var array rowset The array of posts to be returned + * @since 3.2.10-RC1 + * @since 3.3.1-RC1 + */ + $vars = [ + 'post_ids', + 'acl_list', + 'read_tracking', + 'rowset', + ]; + extract($phpbb_dispatcher->trigger_event('core.mcp_get_post_data_after', compact($vars))); + return $rowset; } From 64ce9d221844bbbe0d2666f2202739ab625bf19b Mon Sep 17 00:00:00 2001 From: kasimi Date: Fri, 17 Apr 2020 16:28:50 +0200 Subject: [PATCH 2/2] [ticket/16448] Added $phpbb_dispatcher PHPBB3-16448 --- phpBB/includes/functions_mcp.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phpBB/includes/functions_mcp.php b/phpBB/includes/functions_mcp.php index 2c198e54df..b3e12e78e4 100644 --- a/phpBB/includes/functions_mcp.php +++ b/phpBB/includes/functions_mcp.php @@ -197,7 +197,7 @@ function phpbb_get_topic_data($topic_ids, $acl_list = false, $read_tracking = fa */ function phpbb_get_post_data($post_ids, $acl_list = false, $read_tracking = false) { - global $db, $auth, $config, $user, $phpbb_container; + global $db, $auth, $config, $user, $phpbb_dispatcher, $phpbb_container; $rowset = array();