FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » FUDforum » FUDforum Installation Issues » Duplicate posts, using maillist.php
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: Duplicate posts, using maillist.php [message #157825 is a reply to message #157808] Tue, 19 August 2008 18:23 Go to previous messageGo to previous message
srchild is currently offline  srchild   United Kingdom
Messages: 88
Registered: December 2003
Location: UK
Karma:
Member
srchild wrote on Sun, 10 August 2008 21:11

I see that mlist_post.inc writes that header, and indeed the header is there in outgoing messages.

But I don't see where that header is checked for in incoming mailing list messages? Specifically, grepping the string 'X-FUDforum'...


Ah found it, you lower-cased it.

Fixed the bug, or at least got a workaround:

In maillist.php you have this code:

// Handler for our own messages, which do not need to be imported.
if (isset($emsg->headers['x-fudforum']) && preg_match('!([A-Za-z0-9]{32}) <([0-9]+)>!', $emsg->headers['x-fudforum'], $m)) {
        if ($m[1] == md5($GLOBALS['WWW_ROOT'])) {
                        q("UPDATE ".sql_p."msg SET mlist_msg_id='".addslashes($emsg->msg_id)."' WHERE id=".intval($m[2])." AND mlist_msg_id IS NULL");
        if (db_affected()) {
              exit;
              }
         }
}


But since v 1.14 2005/09/08 mlist_post.inc has set mlist_msg_id when sending the message out, so the UPDATE above always affects zero rows and hence

    if (db_affected()) {
          exit;
    }


does not exit and the message is filed as a duplicate in the forum.

Fix/workaround is to do this:


 //      if (db_affected()) {
                exit;
 //      }


Any reason not to do that?



Simon Child
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Geo-location stop working after upgrade
Next Topic: FUDforum Failed decompressing the archive
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Fri Nov 22 13:16:23 GMT 2024

Total time taken to generate the page: 0.03961 seconds