From 78ff392b646e6dbac1934fe91440ab0a63d4e084 Mon Sep 17 00:00:00 2001 From: Daniel Sinn Date: Tue, 29 Nov 2016 13:34:28 -0500 Subject: [ticket/14882] Add core event to MCP after move post sync PHPBB3-14882 --- phpBB/includes/functions_admin.php | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) (limited to 'phpBB/includes/functions_admin.php') diff --git a/phpBB/includes/functions_admin.php b/phpBB/includes/functions_admin.php index 1dc246ec33..61535efcd6 100644 --- a/phpBB/includes/functions_admin.php +++ b/phpBB/includes/functions_admin.php @@ -642,7 +642,7 @@ function move_posts($post_ids, $topic_id, $auto_sync = true) * @event core.move_posts_before * @var array post_ids Array of post ids to move * @var string topic_id The topic id the posts are moved to - * @var bool auto_sync Whether or not to perform auto sync + * @var bool auto_sync Whether or not to perform auto sync * @var array forum_ids Array of the forum ids the posts are moved from * @var array topic_ids Array of the topic ids the posts are moved from * @var array forum_row Array with the forum id of the topic the posts are moved to @@ -674,7 +674,7 @@ function move_posts($post_ids, $topic_id, $auto_sync = true) * @event core.move_posts_after * @var array post_ids Array of the moved post ids * @var string topic_id The topic id the posts are moved to - * @var bool auto_sync Whether or not to perform auto sync + * @var bool auto_sync Whether or not to perform auto sync * @var array forum_ids Array of the forum ids the posts are moved from * @var array topic_ids Array of the topic ids the posts are moved from * @var array forum_row Array with the forum id of the topic the posts are moved to @@ -698,6 +698,28 @@ function move_posts($post_ids, $topic_id, $auto_sync = true) sync('topic_attachment', 'topic_id', $topic_ids); sync('topic', 'topic_id', $topic_ids, true); sync('forum', 'forum_id', $forum_ids, true, true); + + /** + * Perform additional actions after move post sync + * + * @event core.move_posts_sync_after + * @var array post_ids Array of the moved post ids + * @var string topic_id The topic id the posts are moved to + * @var bool auto_sync Whether or not to perform auto sync + * @var array forum_ids Array of the forum ids the posts are moved from + * @var array topic_ids Array of the topic ids the posts are moved from + * @var array forum_row Array with the forum id of the topic the posts are moved to + * @since 3.1.11-RC1 + */ + $vars = array( + 'post_ids', + 'topic_id', + 'auto_sync', + 'forum_ids', + 'topic_ids', + 'forum_row', + ); + extract($phpbb_dispatcher->trigger_event('core.move_posts_sync_after', compact($vars))); } // Update posted information -- cgit v1.2.1 From aa84ea8e5d13ecec1421e9f90071f4705f72e739 Mon Sep 17 00:00:00 2001 From: Daniel Sinn Date: Tue, 20 Dec 2016 16:46:50 -0500 Subject: [ticket/14882] Correct type of topic_id for function_admin's move_posts events PHPBB3-14882 --- phpBB/includes/functions_admin.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'phpBB/includes/functions_admin.php') diff --git a/phpBB/includes/functions_admin.php b/phpBB/includes/functions_admin.php index 61535efcd6..4bac718999 100644 --- a/phpBB/includes/functions_admin.php +++ b/phpBB/includes/functions_admin.php @@ -641,7 +641,7 @@ function move_posts($post_ids, $topic_id, $auto_sync = true) * * @event core.move_posts_before * @var array post_ids Array of post ids to move - * @var string topic_id The topic id the posts are moved to + * @var int topic_id The topic id the posts are moved to * @var bool auto_sync Whether or not to perform auto sync * @var array forum_ids Array of the forum ids the posts are moved from * @var array topic_ids Array of the topic ids the posts are moved from @@ -673,7 +673,7 @@ function move_posts($post_ids, $topic_id, $auto_sync = true) * * @event core.move_posts_after * @var array post_ids Array of the moved post ids - * @var string topic_id The topic id the posts are moved to + * @var int topic_id The topic id the posts are moved to * @var bool auto_sync Whether or not to perform auto sync * @var array forum_ids Array of the forum ids the posts are moved from * @var array topic_ids Array of the topic ids the posts are moved from @@ -704,7 +704,7 @@ function move_posts($post_ids, $topic_id, $auto_sync = true) * * @event core.move_posts_sync_after * @var array post_ids Array of the moved post ids - * @var string topic_id The topic id the posts are moved to + * @var int topic_id The topic id the posts are moved to * @var bool auto_sync Whether or not to perform auto sync * @var array forum_ids Array of the forum ids the posts are moved from * @var array topic_ids Array of the topic ids the posts are moved from -- cgit v1.2.1