fix for 55983 pop filters mis-applied r=jefft, sr=alecf, a=jar

This commit is contained in:
bienvenu%netscape.com 2000-10-24 14:38:20 +00:00
Родитель a367e62ae7
Коммит 0d088c1232
4 изменённых файлов: 15 добавлений и 1 удалений

Просмотреть файл

@ -147,6 +147,9 @@ interface nsIMsgDatabase : nsIDBChangeAnnouncer {
void DeleteHeader(in nsIMsgDBHdr msgHdr, in nsIDBChangeListener instigator,
in boolean commit, in boolean notify);
// lower level routine that doesn't remove hdr from thread or adjust counts
void RemoveHeaderMdbRow(in nsIMsgDBHdr msgHdr);
void UndoDelete(in nsIMsgDBHdr msgHdr);
void MarkLater(in nsMsgKey key, in PRTime until);

Просмотреть файл

@ -163,6 +163,8 @@ public:
NS_IMETHOD DeleteHeader(nsIMsgDBHdr *msgHdr, nsIDBChangeListener *instigator,
PRBool commit, PRBool notify);
NS_IMETHOD RemoveHeaderMdbRow(nsIMsgDBHdr *msgHdr);
NS_IMETHOD UndoDelete(nsIMsgDBHdr *msgHdr);
NS_IMETHOD MarkLater(nsMsgKey key, PRTime until);

Просмотреть файл

@ -1401,6 +1401,13 @@ nsresult nsMsgDatabase::RemoveHeaderFromThread(nsMsgHdr *msgHdr)
return ret;
}
NS_IMETHODIMP nsMsgDatabase::RemoveHeaderMdbRow(nsIMsgDBHdr *msg)
{
NS_ENSURE_ARG_POINTER(msg);
nsMsgHdr* msgHdr = NS_STATIC_CAST(nsMsgHdr*, msg); // closed system, so this is ok
return RemoveHeaderFromDB(msgHdr);
}
// This is a lower level routine which doesn't send notifcations or
// update folder info. One use is when a rule fires moving a header
// from one db to another, to remove it from the first db.

Просмотреть файл

@ -1617,7 +1617,6 @@ PRInt32 nsParseNewMailState::PublishMsgHeader()
#endif
} // if it was moved by imap filter, m_parseMsgState->m_newMsgHdr == nsnull
m_newMsgHdr = null_nsCOMPtr();
}
return 0;
@ -2025,6 +2024,9 @@ nsresult nsParseNewMailState::MoveIncorporatedMessage(nsIMsgDBHdr *mailHdr,
if (loggingEnabled)
filter->LogRuleHit(GetLogFile(), mailHdr);
// cleanup after mailHdr in source DB because we moved the message.
m_mailDB->RemoveHeaderMdbRow(mailHdr);
return err;
}