Closed (fixed)
Project:
phpBB2Drupal
Version:
master
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
26 Dec 2007 at 19:42 UTC
Updated:
25 Feb 2008 at 13:41 UTC
When I import Private messages, I get more messages than were viewable in phpbb. This is a good thing. (Feature: find lost PM's!)
However, those messages that can be seen in phpbb have two entries for them after import to Drupal.
In short, a check is needed to make sure that duplicate entries are not saved.
Comments
Comment #1
naheemsays commentedJust had a good nose around and it seems It seems that phpbb saves each message twice - once for the recipient and once for the user. Privatemsg saves one message and has columns which show if either user has deleted it or not.
The rows for each duplicate message are consecutive, unless one of the users has deleted their copy.
Only way I can see to stop duplications is a comparison of where sender, recipient, timestamp AND body match for an already imported message. Any better ideas?
PS this bug will probably appear in all versions of the phpbb2drupal module that has a pm import feature.
Comment #2
naheemsays commentedCan someone help me with the sql statement for this? I think we do not need to match the body, just the authior, recipient and timestamp. What I have so far(not working):
Comment #3
naheemsays commentedThe following code works for drupal 6:
Comment #4
naheemsays commentedComment #5
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.