Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
editpost.php hooks
#1
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
All my plugins are available for free at MyBB Extend and on my GitHub. MyBB-Plugins.com has been closed and none of my plugins are officially maintained or supported.
#2
Moving to suggestions to fix in 1.6 since I don't want to screw up any plugins that already use that hook.
#3
Okay Smile
All my plugins are available for free at MyBB Extend and on my GitHub. MyBB-Plugins.com has been closed and none of my plugins are officially maintained or supported.


Forum Jump:


Users browsing this thread: 1 Guest(s)