mybb / merge-system

The MyBB Merge System allows for easy merging of an existing forum (be it MyBB or another forum software) into a MyBB 1.8.x forum.
Other
34 stars 33 forks source link

Remove integer restriction on threads's `closed` field. #227

Closed yuliu closed 5 years ago

yuliu commented 5 years ago

This is a very very tiny modification, maybe unnecessary because a board converter's subclass can override this setting.

Since this Merge System has been started here in GitHub, as I can find, the closed field in threads base module is recognized then restricted as an integer. This setting prevents importing threads with a moved mark.

I also checked MyBB's installation SQL, before and since the date of the first Merge's commit of the threads module, the threads table has always defined closed as a VARCHAR, see this commit.

BTW, I'm a little more curious. In a 1.8.x version upgrade file, there's a $to_int array upgrading fields to integer types, which contains this closed field, but ignores it in the execution.

Sorry for bothering you MyBB members for such a small commit.

euantorano commented 5 years ago

Good catch, thanks!

BTW, I'm a little more curious. In a 1.8.x version upgrade file, there's a $to_int array upgrading fields to integer types, which contains this closed field, but ignores it in the execution.

🎉 You found one of the many weird bits of MyBB's history 🎉

Seriously though, I've no idea what's going on there. That code's been like that since before the move from SVN to Git, so any historical commit messages or anything that may explain it is unfortunately long gone.