2009-07-24, 04:52 PM
This:
At the beginning of editpost.php and after:
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
$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