From d999e9bf8b65ecb8963f494af31b34af4b42106d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dark=E2=9D=B6?= Date: Sat, 20 Apr 2019 14:48:10 +0530 Subject: [PATCH 1/3] [ticket/16024] Add core.topic_review_modify_sql_ary PHPBB3-16024 --- phpBB/includes/functions_posting.php | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/phpBB/includes/functions_posting.php b/phpBB/includes/functions_posting.php index 3640f543d9..bc456b7190 100644 --- a/phpBB/includes/functions_posting.php +++ b/phpBB/includes/functions_posting.php @@ -978,6 +978,30 @@ function topic_review($topic_id, $forum_id, $mode = 'topic_review', $cur_post_id AND u.user_id = p.poster_id', ); + /** + * Event to modify the SQL query for topic reviews + * + * @event core.topic_review_modify_sql_ary + * @var int topic_id The topic ID that is being reviewed + * @var int forum_id The topic's forum ID + * @var string mode The topic review mode + * @var int cur_post_id Post offset ID + * @var bool show_quote_button Flag indicating if the quote button should be displayed + * @var array post_list Array with the post IDs + * @var array sql_ary Array with the SQL query + * @since 3.2.6-RC1 + */ + $vars = array( + 'topic_id', + 'forum_id', + 'mode', + 'cur_post_id', + 'show_quote_button', + 'post_list', + 'sql_ary', + ); + extract($phpbb_dispatcher->trigger_event('core.topic_review_modify_sql_ary', compact($vars))); + $sql = $db->sql_build_query('SELECT', $sql_ary); $result = $db->sql_query($sql); From a0dfc35cb9639723586abe12f1c6ff6e10ef44a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dark=E2=9D=B6?= Date: Sat, 20 Apr 2019 15:00:32 +0530 Subject: [PATCH 2/3] [ticket/16024] Add core.topic_review_modify_sql_ary PHPBB3-16024 --- phpBB/includes/functions_posting.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phpBB/includes/functions_posting.php b/phpBB/includes/functions_posting.php index bc456b7190..acd6783d5e 100644 --- a/phpBB/includes/functions_posting.php +++ b/phpBB/includes/functions_posting.php @@ -989,7 +989,7 @@ function topic_review($topic_id, $forum_id, $mode = 'topic_review', $cur_post_id * @var bool show_quote_button Flag indicating if the quote button should be displayed * @var array post_list Array with the post IDs * @var array sql_ary Array with the SQL query - * @since 3.2.6-RC1 + * @since 3.2.6 */ $vars = array( 'topic_id', From 5c428517301994a47d253c9a9e85e745e5837b31 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dark=E2=9D=B6?= Date: Tue, 7 May 2019 20:49:56 +0530 Subject: [PATCH 3/3] [ticket/16024] Add core.topic_review_modify_sql_ary PHPBB3-16024 --- phpBB/includes/functions_posting.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phpBB/includes/functions_posting.php b/phpBB/includes/functions_posting.php index acd6783d5e..5b7e0eafd6 100644 --- a/phpBB/includes/functions_posting.php +++ b/phpBB/includes/functions_posting.php @@ -989,7 +989,7 @@ function topic_review($topic_id, $forum_id, $mode = 'topic_review', $cur_post_id * @var bool show_quote_button Flag indicating if the quote button should be displayed * @var array post_list Array with the post IDs * @var array sql_ary Array with the SQL query - * @since 3.2.6 + * @since 3.2.8-RC1 */ $vars = array( 'topic_id',