MyBB Community Forums

Full Version: Moving a Plugin Hook in class_moderation.php
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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.
The dev site is not for suggesting features. We have these forums and the ideas site for that.
(2009-11-25, 11:51 PM)Ryan Gordon Wrote: [ -> ]The dev site is not for suggesting features. We have these forums and the ideas site for that.

I understand that now, I wasn't sure where to put this since it isn't a feature, not a bug, not really an idea but more of a suggestion.
We consider suggestions feature requests. Basically if it isn't a bug, it's a feature request because it in a different scope of just fixing "broken" code.
I'd support moving this hook, would be useful for me aswell (to get back on topic) Smile