MyBB Community Forums

Full Version: yes/no options
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
DennisTT Wrote:
Tikitiki Wrote:most variables are either TRUE or FALSE, or 0, or a negative number represting an error.
Most of the permission-related ones are using 'yes' and 'no' though.
Why is this? Why is it not using bools or ints instead of strings to check if it has permission or not?
I think it's so we can add an "inherit" option later on.
I don't really understand what you mean by that. Can you explain further?
For forum permissions an 'inherit' option would mean that the permission has not been explicitly set to "yes" or "no". It can also be thought of as "ignore" this permission for this usergroup in this forum, and use the default permission or a permission from another group that was explicitly set. This would resolve some of the current problems with the permissions system as it assumes that the "no" permission is never explicitly set.
That can be done with the ints 0,1,2 though? 0 is false, 1 is true and 2 is ignore.
It'll all be changed in 1.4 to make proper use of INT/ENUM columns where appropriate (yes/no, on/off will become 1 and 0)