From 9d2ab88c69492e535bfd984a81f92be30c85e157 Mon Sep 17 00:00:00 2001 From: Alec Date: Sat, 12 Jan 2019 06:48:57 -0500 Subject: [PATCH 01/10] [ticket/15925] Add core.mcp_main_modify_fork_post_sql Modify the forked post's sql array before it's inserted into the database Lets additional variables be added into the sql_ary Allows the same edits as mcp_main_fork_sql_after but for posts not topics PHPBB3-15925 --- phpBB/includes/mcp/mcp_main.php | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/phpBB/includes/mcp/mcp_main.php b/phpBB/includes/mcp/mcp_main.php index 9cf4ca9c96..a3fa0b20d9 100644 --- a/phpBB/includes/mcp/mcp_main.php +++ b/phpBB/includes/mcp/mcp_main.php @@ -1563,6 +1563,26 @@ function mcp_fork_topic($topic_ids) $counter[$row['poster_id']] = 1; } } + + /** + * Modify the forked post's sql array before it's inserted into the database. + * + * @event core.mcp_main_modify_fork_post_sql + * @var int new_topic_id The newly created topic ID + * @var int to_forum_id The forum ID where the forked topic has been moved to + * @var array sql_ary SQL Array with the post's data + * @var array row Post data + * @var array counter Array with post counts + * @since 3.2.6-RC1 + */ + $vars = array( + 'new_topic_id', + 'to_forum_id', + 'sql_ary', + 'row', + 'counter', + ); + extract($phpbb_dispatcher->trigger_event('core.mcp_main_modify_fork_post_sql', compact($vars))); $db->sql_query('INSERT INTO ' . POSTS_TABLE . ' ' . $db->sql_build_array('INSERT', $sql_ary)); $new_post_id = $db->sql_nextid(); From 67284974349f194d3c855bda0a67bda485fd0621 Mon Sep 17 00:00:00 2001 From: Alec Date: Sat, 12 Jan 2019 06:50:39 -0500 Subject: [PATCH 02/10] [ticket/15925] Add core.sync_forum_last_post_info_sql Add core event to modify the last posts' data retrieved to update forums' data Also add $phpbb_dispatcher to sync globals to allow function use PHPBB3-15925 --- phpBB/includes/functions_admin.php | 27 +++++++++++++++++++++------ 1 file changed, 21 insertions(+), 6 deletions(-) diff --git a/phpBB/includes/functions_admin.php b/phpBB/includes/functions_admin.php index b0ad70366e..46c0521bad 100644 --- a/phpBB/includes/functions_admin.php +++ b/phpBB/includes/functions_admin.php @@ -1324,7 +1324,7 @@ function update_posted_info(&$topic_ids) */ function sync($mode, $where_type = '', $where_ids = '', $resync_parents = false, $sync_extra = false) { - global $db; + global $db, $phpbb_dispatcher; if (is_array($where_ids)) { @@ -1826,11 +1826,26 @@ function sync($mode, $where_type = '', $where_ids = '', $resync_parents = false, // 5: Retrieve last_post infos if (count($post_ids)) { - $sql = 'SELECT p.post_id, p.poster_id, p.post_subject, p.post_time, p.post_username, u.username, u.user_colour - FROM ' . POSTS_TABLE . ' p, ' . USERS_TABLE . ' u - WHERE ' . $db->sql_in_set('p.post_id', $post_ids) . ' - AND p.poster_id = u.user_id'; - $result = $db->sql_query($sql); + $sql_ary = array( + 'SELECT' => 'p.post_id, p.poster_id, p.post_subject, p.post_time, p.post_username, u.username, u.user_colour', + 'FROM' => array( + POSTS_TABLE => 'p', + USERS_TABLE => 'u', + ), + 'WHERE' => $db->sql_in_set('p.post_id', $post_ids) . ' + AND p.poster_id = u.user_id', + ); + + /** + * Event to modify the SQL array to get the post and user data from all forums' last posts + * + * @event core.sync_forum_last_post_info_sql + * @var array sql_ary SQL array with some post and user data from the last posts list + * @since 3.2.6-RC1 + */ + $vars = array('sql_ary'); + extract($phpbb_dispatcher->trigger_event('core.sync_forum_last_post_info_sql', compact($vars))); + $result = $db->sql_query($db->sql_build_query('SELECT', $sql_ary)); while ($row = $db->sql_fetchrow($result)) { From 740b2ffbf2a63c201f8f173203f42ab5692407d6 Mon Sep 17 00:00:00 2001 From: Alec Date: Sat, 12 Jan 2019 07:04:30 -0500 Subject: [PATCH 03/10] [ticket/15925] Add core.sync_modify_forum_data Allow fieldnames and forum_data to be updated before synced with the database Used in conjunction with post_info to pull that data PHPBB3-15925 --- phpBB/includes/functions_admin.php | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/phpBB/includes/functions_admin.php b/phpBB/includes/functions_admin.php index 46c0521bad..f3924ea155 100644 --- a/phpBB/includes/functions_admin.php +++ b/phpBB/includes/functions_admin.php @@ -1877,7 +1877,6 @@ function sync($mode, $where_type = '', $where_ids = '', $resync_parents = false, } } } - unset($post_info); } // 6: Now do that thing @@ -1888,6 +1887,23 @@ function sync($mode, $where_type = '', $where_ids = '', $resync_parents = false, array_push($fieldnames, 'posts_approved', 'posts_unapproved', 'posts_softdeleted', 'topics_approved', 'topics_unapproved', 'topics_softdeleted'); } + /** + * Event to modify the SQL array to get the post and user data from all forums' last posts + * + * @event core.sync_modify_forum_data + * @var array forum_data Array with data to update for all forum ids + * @var array post_info Array with some post and user data from the last posts list + * @var array fieldnames Array with the partial column names that are being updated + * @since 3.2.6-RC1 + */ + $vars = array( + 'forum_data', + 'post_info', + 'fieldnames', + ); + extract($phpbb_dispatcher->trigger_event('core.sync_modify_forum_data', compact($vars))); + unset($post_info); + foreach ($forum_data as $forum_id => $row) { $sql_ary = array(); From 9ff92f2c36faf28a9a88e3aef7174320ea1d4c32 Mon Sep 17 00:00:00 2001 From: Alec Date: Sat, 12 Jan 2019 07:06:54 -0500 Subject: [PATCH 04/10] [ticket/15925] Add core.sync_topic_last_post_info_sql Add event to get more post or user data when syncing Topic_data is updated with the data from this query, so it needs to be accessed Custom_fieldnames is merged with fieldnames later, unlike the other event This keeps the integrity of the core's code PHPBB3-15925 --- phpBB/includes/functions_admin.php | 33 +++++++++++++++++++++++++----- 1 file changed, 28 insertions(+), 5 deletions(-) diff --git a/phpBB/includes/functions_admin.php b/phpBB/includes/functions_admin.php index f3924ea155..c7659b0305 100644 --- a/phpBB/includes/functions_admin.php +++ b/phpBB/includes/functions_admin.php @@ -2072,11 +2072,31 @@ function sync($mode, $where_type = '', $where_ids = '', $resync_parents = false, unset($delete_topics, $delete_topic_ids); } - $sql = 'SELECT p.post_id, p.topic_id, p.post_visibility, p.poster_id, p.post_subject, p.post_username, p.post_time, u.username, u.user_colour - FROM ' . POSTS_TABLE . ' p, ' . USERS_TABLE . ' u - WHERE ' . $db->sql_in_set('p.post_id', $post_ids) . ' - AND u.user_id = p.poster_id'; - $result = $db->sql_query($sql); + $sql_ary = array( + 'SELECT' => 'p.post_id, p.topic_id, p.post_visibility, p.poster_id, p.post_subject, p.post_username, p.post_time, u.username, u.user_colour', + 'FROM' => array( + POSTS_TABLE => 'p', + USERS_TABLE => 'u', + ), + 'WHERE' => $db->sql_in_set('p.post_id', $post_ids) . ' + AND u.user_id = p.poster_id', + ); + + $custom_fieldnames = array(); + /** + * Event to modify the SQL array to get the post and user data from all topics' last posts + * + * @event core.sync_topic_last_post_info_sql + * @var array sql_ary SQL array with some post and user data from the last posts list + * @var array custom_fieldnames Empty array for custom fieldnames to update the topics_table with + * @since 3.2.6-RC1 + */ + $vars = array( + 'sql_ary', + 'custom_fieldnames', + ); + extract($phpbb_dispatcher->trigger_event('core.sync_topic_last_post_info_sql', compact($vars))); + $result = $db->sql_query($db->sql_build_query('SELECT', $sql_ary)); while ($row = $db->sql_fetchrow($result)) { @@ -2213,6 +2233,9 @@ function sync($mode, $where_type = '', $where_ids = '', $resync_parents = false, // These are fields that will be synchronised $fieldnames = array('time', 'visibility', 'posts_approved', 'posts_unapproved', 'posts_softdeleted', 'poster', 'first_post_id', 'first_poster_name', 'first_poster_colour', 'last_post_id', 'last_post_subject', 'last_post_time', 'last_poster_id', 'last_poster_name', 'last_poster_colour'); + // Add custom fieldnames + $fieldnames = array_merge($fieldnames, $custom_fieldnames); + if ($sync_extra) { // This routine assumes that post_reported values are correct From 40d825d1c6533e8bc83526c6339f9f1ef6ab5b50 Mon Sep 17 00:00:00 2001 From: Alec Date: Sat, 12 Jan 2019 07:07:41 -0500 Subject: [PATCH 05/10] [ticket/15925] Add core.sync_modify_topic_data Allow modification of topic_data when syncing topics Another event has been added to modify the contents of $row This means that topic_data can be populated with anything added to that query PHPBB3-15925 --- phpBB/includes/functions_admin.php | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/phpBB/includes/functions_admin.php b/phpBB/includes/functions_admin.php index c7659b0305..a990a084e7 100644 --- a/phpBB/includes/functions_admin.php +++ b/phpBB/includes/functions_admin.php @@ -2118,6 +2118,22 @@ function sync($mode, $where_type = '', $where_ids = '', $resync_parents = false, $topic_data[$topic_id]['last_poster_name'] = ($row['poster_id'] == ANONYMOUS) ? $row['post_username'] : $row['username']; $topic_data[$topic_id]['last_poster_colour'] = $row['user_colour']; } + + /** + * Event to modify the topic_data when syncing topics + * + * @event core.sync_modify_topic_data + * @var array topic_data Array with the topics' data we are syncing + * @var array row Array with some of the current user and post data + * @var int topic_id The current topic_id of $row + * @since 3.2.6-RC1 + */ + $vars = array( + 'topic_data', + 'row', + 'topic_id', + ); + extract($phpbb_dispatcher->trigger_event('core.sync_modify_topic_data', compact($vars))); } $db->sql_freeresult($result); From 516d0f5b27874c18b8f9c3aac4210dddfaff9d75 Mon Sep 17 00:00:00 2001 From: Alec Date: Sat, 12 Jan 2019 07:08:48 -0500 Subject: [PATCH 06/10] [ticket/15925] Add core.update_post_info_modify_posts_sql Add core event to modify the last posts' data retrieved to update forums' data Also add $phpbb_dispatcher to sync globals to allow function use PHPBB3-15925 --- phpBB/includes/functions_posting.php | 31 ++++++++++++++++++++++------ 1 file changed, 25 insertions(+), 6 deletions(-) diff --git a/phpBB/includes/functions_posting.php b/phpBB/includes/functions_posting.php index 43492f5eee..ca5a6463e4 100644 --- a/phpBB/includes/functions_posting.php +++ b/phpBB/includes/functions_posting.php @@ -256,7 +256,7 @@ function generate_smilies($mode, $forum_id) */ function update_post_information($type, $ids, $return_update_sql = false) { - global $db; + global $db, $phpbb_dispatcher; if (empty($ids)) { @@ -340,11 +340,30 @@ function update_post_information($type, $ids, $return_update_sql = false) if (count($last_post_ids)) { - $sql = 'SELECT p.' . $type . '_id, p.post_id, p.post_subject, p.post_time, p.poster_id, p.post_username, u.user_id, u.username, u.user_colour - FROM ' . POSTS_TABLE . ' p, ' . USERS_TABLE . ' u - WHERE p.poster_id = u.user_id - AND ' . $db->sql_in_set('p.post_id', $last_post_ids); - $result = $db->sql_query($sql); + $sql_ary = array( + 'SELECT' => 'p.' . $type . '_id, p.post_id, p.post_subject, p.post_time, p.poster_id, p.post_username, u.user_id, u.username, u.user_colour', + 'FROM' => array( + POSTS_TABLE => 'p', + USERS_TABLE => 'u', + ), + 'WHERE' => $db->sql_in_set('p.post_id', $last_post_ids) . ' + AND p.poster_id = u.user_id', + ); + + /** + * Event to modify the SQL array to get the post and user data from all last posts + * + * @event core.update_post_info_modify_posts_sql + * @var string type The table being updated (forum or topic) + * @var array sql_ary SQL array to get some of the last posts' data + * @since 3.2.6-RC1 + */ + $vars = array( + 'type', + 'sql_ary', + ); + extract($phpbb_dispatcher->trigger_event('core.update_post_info_modify_posts_sql', compact($vars))); + $result = $db->sql_query($db->sql_build_query('SELECT', $sql_ary)); while ($row = $db->sql_fetchrow($result)) { From 86bbd0560884d07e7d64fa7f388df2cc175f7517 Mon Sep 17 00:00:00 2001 From: Alec Date: Sat, 12 Jan 2019 07:09:27 -0500 Subject: [PATCH 07/10] [ticket/15925] Add core.update_post_info_modify_sql Add event to modify the sql to allow for more columns to be updated during sync Same as sync events but only ran for last posts, slightly different formatting PHPBB3-15925 --- phpBB/includes/functions_posting.php | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/phpBB/includes/functions_posting.php b/phpBB/includes/functions_posting.php index ca5a6463e4..ad394154ce 100644 --- a/phpBB/includes/functions_posting.php +++ b/phpBB/includes/functions_posting.php @@ -365,8 +365,10 @@ function update_post_information($type, $ids, $return_update_sql = false) extract($phpbb_dispatcher->trigger_event('core.update_post_info_modify_posts_sql', compact($vars))); $result = $db->sql_query($db->sql_build_query('SELECT', $sql_ary)); + $rowset = array(); while ($row = $db->sql_fetchrow($result)) { + $rowset[] = $row; $update_sql[$row["{$type}_id"]][] = $type . '_last_post_id = ' . (int) $row['post_id']; $update_sql[$row["{$type}_id"]][] = "{$type}_last_post_subject = '" . $db->sql_escape($row['post_subject']) . "'"; $update_sql[$row["{$type}_id"]][] = $type . '_last_post_time = ' . (int) $row['post_time']; @@ -375,6 +377,22 @@ function update_post_information($type, $ids, $return_update_sql = false) $update_sql[$row["{$type}_id"]][] = "{$type}_last_poster_name = '" . (($row['poster_id'] == ANONYMOUS) ? $db->sql_escape($row['post_username']) : $db->sql_escape($row['username'])) . "'"; } $db->sql_freeresult($result); + + /** + * Event to modify the update_sql array to add new update data for forum or topic last posts + * + * @event core.update_post_info_modify_sql + * @var string type The table being updated (forum or topic) + * @var array rowset Array with the posts data + * @var array update_sql Array with SQL data to update the forums or topics table with + * @since 3.2.6-RC1 + */ + $vars = array( + 'type', + 'rowset', + 'update_sql', + ); + extract($phpbb_dispatcher->trigger_event('core.update_post_info_modify_sql', compact($vars))); } unset($empty_forums, $ids, $last_post_ids); From 60d672797458e0ff52e95376d181f0cf3d65e2f6 Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Sat, 28 Nov 2020 22:18:49 +0100 Subject: [PATCH 08/10] [ticket/15925] Update events for 3.3.3-RC1 PHPBB3-15925 --- phpBB/includes/functions_admin.php | 25 +++++++++++++------------ phpBB/includes/functions_posting.php | 13 +++++++------ phpBB/includes/mcp/mcp_main.php | 6 +++--- 3 files changed, 23 insertions(+), 21 deletions(-) diff --git a/phpBB/includes/functions_admin.php b/phpBB/includes/functions_admin.php index a990a084e7..697b5bfa2a 100644 --- a/phpBB/includes/functions_admin.php +++ b/phpBB/includes/functions_admin.php @@ -1841,9 +1841,9 @@ function sync($mode, $where_type = '', $where_ids = '', $resync_parents = false, * * @event core.sync_forum_last_post_info_sql * @var array sql_ary SQL array with some post and user data from the last posts list - * @since 3.2.6-RC1 + * @since 3.3.3-RC1 */ - $vars = array('sql_ary'); + $vars = ['sql_ary']; extract($phpbb_dispatcher->trigger_event('core.sync_forum_last_post_info_sql', compact($vars))); $result = $db->sql_query($db->sql_build_query('SELECT', $sql_ary)); @@ -1894,13 +1894,13 @@ function sync($mode, $where_type = '', $where_ids = '', $resync_parents = false, * @var array forum_data Array with data to update for all forum ids * @var array post_info Array with some post and user data from the last posts list * @var array fieldnames Array with the partial column names that are being updated - * @since 3.2.6-RC1 + * @since 3.3.3-RC1 */ - $vars = array( + $vars = [ 'forum_data', 'post_info', 'fieldnames', - ); + ]; extract($phpbb_dispatcher->trigger_event('core.sync_modify_forum_data', compact($vars))); unset($post_info); @@ -2082,19 +2082,19 @@ function sync($mode, $where_type = '', $where_ids = '', $resync_parents = false, AND u.user_id = p.poster_id', ); - $custom_fieldnames = array(); + $custom_fieldnames = []; /** * Event to modify the SQL array to get the post and user data from all topics' last posts * * @event core.sync_topic_last_post_info_sql * @var array sql_ary SQL array with some post and user data from the last posts list * @var array custom_fieldnames Empty array for custom fieldnames to update the topics_table with - * @since 3.2.6-RC1 + * @since 3.3.1-RC1 */ - $vars = array( + $vars = [ 'sql_ary', 'custom_fieldnames', - ); + ]; extract($phpbb_dispatcher->trigger_event('core.sync_topic_last_post_info_sql', compact($vars))); $result = $db->sql_query($db->sql_build_query('SELECT', $sql_ary)); @@ -2126,13 +2126,13 @@ function sync($mode, $where_type = '', $where_ids = '', $resync_parents = false, * @var array topic_data Array with the topics' data we are syncing * @var array row Array with some of the current user and post data * @var int topic_id The current topic_id of $row - * @since 3.2.6-RC1 + * @since 3.3.1-RC1 */ - $vars = array( + $vars = [ 'topic_data', 'row', 'topic_id', - ); + ]; extract($phpbb_dispatcher->trigger_event('core.sync_modify_topic_data', compact($vars))); } $db->sql_freeresult($result); @@ -2251,6 +2251,7 @@ function sync($mode, $where_type = '', $where_ids = '', $resync_parents = false, // Add custom fieldnames $fieldnames = array_merge($fieldnames, $custom_fieldnames); + unset($custom_fieldnames); if ($sync_extra) { diff --git a/phpBB/includes/functions_posting.php b/phpBB/includes/functions_posting.php index ad394154ce..b14533b002 100644 --- a/phpBB/includes/functions_posting.php +++ b/phpBB/includes/functions_posting.php @@ -356,12 +356,12 @@ function update_post_information($type, $ids, $return_update_sql = false) * @event core.update_post_info_modify_posts_sql * @var string type The table being updated (forum or topic) * @var array sql_ary SQL array to get some of the last posts' data - * @since 3.2.6-RC1 + * @since 3.3.3-RC1 */ - $vars = array( + $vars = [ 'type', 'sql_ary', - ); + ]; extract($phpbb_dispatcher->trigger_event('core.update_post_info_modify_posts_sql', compact($vars))); $result = $db->sql_query($db->sql_build_query('SELECT', $sql_ary)); @@ -385,14 +385,15 @@ function update_post_information($type, $ids, $return_update_sql = false) * @var string type The table being updated (forum or topic) * @var array rowset Array with the posts data * @var array update_sql Array with SQL data to update the forums or topics table with - * @since 3.2.6-RC1 + * @since 3.3.3-RC1 */ - $vars = array( + $vars = [ 'type', 'rowset', 'update_sql', - ); + ]; extract($phpbb_dispatcher->trigger_event('core.update_post_info_modify_sql', compact($vars))); + unset($rowset); } unset($empty_forums, $ids, $last_post_ids); diff --git a/phpBB/includes/mcp/mcp_main.php b/phpBB/includes/mcp/mcp_main.php index a3fa0b20d9..9d62074341 100644 --- a/phpBB/includes/mcp/mcp_main.php +++ b/phpBB/includes/mcp/mcp_main.php @@ -1573,15 +1573,15 @@ function mcp_fork_topic($topic_ids) * @var array sql_ary SQL Array with the post's data * @var array row Post data * @var array counter Array with post counts - * @since 3.2.6-RC1 + * @since 3.3.3-RC1 */ - $vars = array( + $vars = [ 'new_topic_id', 'to_forum_id', 'sql_ary', 'row', 'counter', - ); + ]; extract($phpbb_dispatcher->trigger_event('core.mcp_main_modify_fork_post_sql', compact($vars))); $db->sql_query('INSERT INTO ' . POSTS_TABLE . ' ' . $db->sql_build_array('INSERT', $sql_ary)); $new_post_id = $db->sql_nextid(); From 22f7f491c5cdb87fdd1b1ff6f4d515a46f69178b Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Thu, 4 Mar 2021 17:14:56 +0100 Subject: [PATCH 09/10] [ticket/15925] Update events for 3.3.4-RC1 PHPBB3-15925 --- phpBB/includes/functions_admin.php | 8 ++++---- phpBB/includes/functions_posting.php | 4 ++-- phpBB/includes/mcp/mcp_main.php | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/phpBB/includes/functions_admin.php b/phpBB/includes/functions_admin.php index 697b5bfa2a..f432fbf342 100644 --- a/phpBB/includes/functions_admin.php +++ b/phpBB/includes/functions_admin.php @@ -1841,7 +1841,7 @@ function sync($mode, $where_type = '', $where_ids = '', $resync_parents = false, * * @event core.sync_forum_last_post_info_sql * @var array sql_ary SQL array with some post and user data from the last posts list - * @since 3.3.3-RC1 + * @since 3.3.4-RC1 */ $vars = ['sql_ary']; extract($phpbb_dispatcher->trigger_event('core.sync_forum_last_post_info_sql', compact($vars))); @@ -1894,7 +1894,7 @@ function sync($mode, $where_type = '', $where_ids = '', $resync_parents = false, * @var array forum_data Array with data to update for all forum ids * @var array post_info Array with some post and user data from the last posts list * @var array fieldnames Array with the partial column names that are being updated - * @since 3.3.3-RC1 + * @since 3.3.4-RC1 */ $vars = [ 'forum_data', @@ -2089,7 +2089,7 @@ function sync($mode, $where_type = '', $where_ids = '', $resync_parents = false, * @event core.sync_topic_last_post_info_sql * @var array sql_ary SQL array with some post and user data from the last posts list * @var array custom_fieldnames Empty array for custom fieldnames to update the topics_table with - * @since 3.3.1-RC1 + * @since 3.3.4-RC1 */ $vars = [ 'sql_ary', @@ -2126,7 +2126,7 @@ function sync($mode, $where_type = '', $where_ids = '', $resync_parents = false, * @var array topic_data Array with the topics' data we are syncing * @var array row Array with some of the current user and post data * @var int topic_id The current topic_id of $row - * @since 3.3.1-RC1 + * @since 3.3.4-RC1 */ $vars = [ 'topic_data', diff --git a/phpBB/includes/functions_posting.php b/phpBB/includes/functions_posting.php index b14533b002..9f97166420 100644 --- a/phpBB/includes/functions_posting.php +++ b/phpBB/includes/functions_posting.php @@ -356,7 +356,7 @@ function update_post_information($type, $ids, $return_update_sql = false) * @event core.update_post_info_modify_posts_sql * @var string type The table being updated (forum or topic) * @var array sql_ary SQL array to get some of the last posts' data - * @since 3.3.3-RC1 + * @since 3.3.4-RC1 */ $vars = [ 'type', @@ -385,7 +385,7 @@ function update_post_information($type, $ids, $return_update_sql = false) * @var string type The table being updated (forum or topic) * @var array rowset Array with the posts data * @var array update_sql Array with SQL data to update the forums or topics table with - * @since 3.3.3-RC1 + * @since 3.3.4-RC1 */ $vars = [ 'type', diff --git a/phpBB/includes/mcp/mcp_main.php b/phpBB/includes/mcp/mcp_main.php index 9d62074341..3d9df63735 100644 --- a/phpBB/includes/mcp/mcp_main.php +++ b/phpBB/includes/mcp/mcp_main.php @@ -1573,7 +1573,7 @@ function mcp_fork_topic($topic_ids) * @var array sql_ary SQL Array with the post's data * @var array row Post data * @var array counter Array with post counts - * @since 3.3.3-RC1 + * @since 3.3.4-RC1 */ $vars = [ 'new_topic_id', From bcea34ee7c48f711cde30cb69ea8884aaa49f17d Mon Sep 17 00:00:00 2001 From: toxyy Date: Fri, 7 May 2021 19:25:35 -0400 Subject: [PATCH 10/10] [ticket/15925] Update events for 3.3.5-RC1 PHPBB3-15925 --- phpBB/includes/functions_admin.php | 8 ++++---- phpBB/includes/functions_posting.php | 4 ++-- phpBB/includes/mcp/mcp_main.php | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/phpBB/includes/functions_admin.php b/phpBB/includes/functions_admin.php index f432fbf342..585f8e0ab8 100644 --- a/phpBB/includes/functions_admin.php +++ b/phpBB/includes/functions_admin.php @@ -1841,7 +1841,7 @@ function sync($mode, $where_type = '', $where_ids = '', $resync_parents = false, * * @event core.sync_forum_last_post_info_sql * @var array sql_ary SQL array with some post and user data from the last posts list - * @since 3.3.4-RC1 + * @since 3.3.5-RC1 */ $vars = ['sql_ary']; extract($phpbb_dispatcher->trigger_event('core.sync_forum_last_post_info_sql', compact($vars))); @@ -1894,7 +1894,7 @@ function sync($mode, $where_type = '', $where_ids = '', $resync_parents = false, * @var array forum_data Array with data to update for all forum ids * @var array post_info Array with some post and user data from the last posts list * @var array fieldnames Array with the partial column names that are being updated - * @since 3.3.4-RC1 + * @since 3.3.5-RC1 */ $vars = [ 'forum_data', @@ -2089,7 +2089,7 @@ function sync($mode, $where_type = '', $where_ids = '', $resync_parents = false, * @event core.sync_topic_last_post_info_sql * @var array sql_ary SQL array with some post and user data from the last posts list * @var array custom_fieldnames Empty array for custom fieldnames to update the topics_table with - * @since 3.3.4-RC1 + * @since 3.3.5-RC1 */ $vars = [ 'sql_ary', @@ -2126,7 +2126,7 @@ function sync($mode, $where_type = '', $where_ids = '', $resync_parents = false, * @var array topic_data Array with the topics' data we are syncing * @var array row Array with some of the current user and post data * @var int topic_id The current topic_id of $row - * @since 3.3.4-RC1 + * @since 3.3.5-RC1 */ $vars = [ 'topic_data', diff --git a/phpBB/includes/functions_posting.php b/phpBB/includes/functions_posting.php index 9f97166420..13d753c131 100644 --- a/phpBB/includes/functions_posting.php +++ b/phpBB/includes/functions_posting.php @@ -356,7 +356,7 @@ function update_post_information($type, $ids, $return_update_sql = false) * @event core.update_post_info_modify_posts_sql * @var string type The table being updated (forum or topic) * @var array sql_ary SQL array to get some of the last posts' data - * @since 3.3.4-RC1 + * @since 3.3.5-RC1 */ $vars = [ 'type', @@ -385,7 +385,7 @@ function update_post_information($type, $ids, $return_update_sql = false) * @var string type The table being updated (forum or topic) * @var array rowset Array with the posts data * @var array update_sql Array with SQL data to update the forums or topics table with - * @since 3.3.4-RC1 + * @since 3.3.5-RC1 */ $vars = [ 'type', diff --git a/phpBB/includes/mcp/mcp_main.php b/phpBB/includes/mcp/mcp_main.php index 3d9df63735..6ba3ed9366 100644 --- a/phpBB/includes/mcp/mcp_main.php +++ b/phpBB/includes/mcp/mcp_main.php @@ -1573,7 +1573,7 @@ function mcp_fork_topic($topic_ids) * @var array sql_ary SQL Array with the post's data * @var array row Post data * @var array counter Array with post counts - * @since 3.3.4-RC1 + * @since 3.3.5-RC1 */ $vars = [ 'new_topic_id',