зеркало из https://github.com/mozilla/pjs.git
fix for 55983 pop filters mis-applied r=jefft, sr=alecf, a=jar
This commit is contained in:
Родитель
a367e62ae7
Коммит
0d088c1232
|
@ -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;
|
||||
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче