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
32 stars 33 forks source link

Fixed conversion of private messages from vBulletin3 #157

Closed fizyk20 closed 9 years ago

fizyk20 commented 9 years ago

Importing private messages from vBulletin 3 didn't work for me, so I fixed it. I'm using 3.6 though and I don't know if there weren't any db structure changes in the later versions, but if there weren't, this should help some people.

JN-Jones commented 9 years ago

What exactly was broken?

fizyk20 commented 9 years ago

Well, the recipients weren't being set properly (toid was always 0), subject wasn't being transferred (since the field in vB is called "title", and the script attempted to read it from "subject") and if the recipients array contained BCC field, it was ignored. EDIT: Oh yeah, and folders weren't being set correctly.

JN-Jones commented 9 years ago

Did you fix #97 too or does vb3 save the pm in the same way we do? (Didn't work that much with vb3 in the past and I'm not able to look at it atm)

fizyk20 commented 9 years ago

It's not exactly the same way, but this issue doesn't apply here anyway (there is a row being inserted for each recipient and one for the author).

JN-Jones commented 9 years ago

Ah that's nice. I'll test your fix when I've time (hopefully this week). Thanks anyways for working on it!

fizyk20 commented 9 years ago

Sure :) You're welcome, I hope it helps :)

I also found a small problem with transferring soft-deleted posts and threads and I also fixed it - it's a one-line fix in two files considering the "visible" field, its values are used a bit differently in vB and in MyBB.

Oh yeah, and one more thing: the version from the repo actually didn't work for me at all, it was getting stuck somewhere along the process. I developed this fix by modifying the version from mybb.com and the just applying the changes to the repo. Is the version on mybb.com in one of the commits here? If yes, then I'll gladly look at what has changed and try to get it working as well as the version from the website.

JN-Jones commented 9 years ago

Yeah there are a lot of issues with small things. Especially with old modules like vb3. I'm trying to fix them one by one but every time I fix one I find ten new :P

JN-Jones commented 9 years ago

Sorry for the late reply.

Can you update the PR to follow our coding standards? Ternary operators aren't allowed and every if needs brackets.

JN-Jones commented 9 years ago

@fizyk20 ? I'd like to get this fixed in 1.8.5 ;)

fizyk20 commented 9 years ago

Sorry, couldn't get to this earlier ;) I modified my changes according to your request.

JN-Jones commented 9 years ago

Ok thanks! I'm going to all PM modules atm to fix #97 and will check your PR when working on vb so hopefully today or tomorrow.