2009-11-25, 10:49 PM
I added a ticket about this on the dev site but it got removed without any explanation, so I'm posting it here to get feedback if it can be done or not.
My suggestion was to move the class_moderation_merge_posts hook in class_moderation.php a couple of lines up to before the extra posts (posts that will be merged in to the main post) are removed. This way if a plugin wants to get any information about the posts such as the uid they can still query the database to get that info.
As it is now, the hook is called after the posts are deleted, so although we get the pids of the extra posts, we can't get any more info about those posts because they're already gone by then.
I've worked around this by adding whatever fields I need from the posts in to the table that my plugin would be using but that just creates data repetition for no reason.
My suggestion was to move the class_moderation_merge_posts hook in class_moderation.php a couple of lines up to before the extra posts (posts that will be merged in to the main post) are removed. This way if a plugin wants to get any information about the posts such as the uid they can still query the database to get that info.
As it is now, the hook is called after the posts are deleted, so although we get the pids of the extra posts, we can't get any more info about those posts because they're already gone by then.
I've worked around this by adding whatever fields I need from the posts in to the table that my plugin would be using but that just creates data repetition for no reason.