MyBB Community Forums

Full Version: A little question about some code...
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Well, the eror checking could be performed earlier. I guess that is just how it was written when it first was.

I'll change that - it'll save some querying for invalid posts.
Chris Boulton Wrote:I guess that is just how it was written when it first was.
Hmm... yeah, you're right, I just checked the original RC2 code and the same problem existed, but there just weren't as many lines separating the query and the check. =/

Quote:I'll change that - it'll save some querying for invalid posts.
Cool. [Image: mininana.gif] Check out newreply and newthread as well... although the problem isn't as bad there, I still think it makes more sense to check the result of the query ASAP. Toungue
Since we are on the topic of optimising code. How about a reply to this?