MyBB Community Forums

Full Version: editpost.php hooks
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
This:
$plugins->run_hooks("editpost_start");
is run twice.

At the beginning of editpost.php and after:
if(!$mybb->input['action'] || $mybb->input['action'] == "editpost")
{

Edit:
Although we are able to know if we are in the second or in the first, I am not going to check that in my plugin as I don't know which one will remain so I will have to run 2 extra queries
Edit 2:
Nevermind, there's no need to run 2 extra queries as long as I just validate permissions when submitting the post after being edited. But if I wanted to validate permissions (it was my initial idea) before the edit post page is displayed, it wouldn't work properly
Moving to suggestions to fix in 1.6 since I don't want to screw up any plugins that already use that hook.
Okay Smile