[junk] purge doesn't work for Junk folder under Local Folders
r/sr=bienvenu, a=sspitzer
This commit is contained in:
sspitzer%netscape.com 2003-05-10 02:11:57 +00:00
parent da46821012
commit ca3b645a8d
3 changed files with 21 additions and 6 deletions

View File

@ -210,6 +210,12 @@ nsresult nsMsgPurgeService::PerformPurge()
rv = server->GetSpamSettings(getter_AddRefs(spamSettings));
NS_ENSURE_SUCCESS(rv, rv);
PRInt32 spamLevel = 0;
spamSettings->GetLevel(&spamLevel);
PR_LOG(MsgPurgeLogModule, PR_LOG_ALWAYS, ("[%d] spamLevel=%d (if 0, don't purge)", serverIndex, spamLevel));
if (spamLevel == 0)
continue;
// check if we are set up to purge for this server
// if not, skip it.
PRBool purgeSpam;
@ -286,7 +292,7 @@ nsresult nsMsgPurgeService::PerformPurge()
{
PRInt32 purgeInterval;
spamSettings->GetPurgeInterval(&purgeInterval);
PR_LOG(MsgPurgeLogModule, PR_LOG_ALWAYS, ("[%d] purging! searching for messages older than %d days", serverIndex, purgeInterval));
PR_LOG(MsgPurgeLogModule, PR_LOG_ALWAYS, ("[%d] purging! searching for messages older than %d days", serverIndex, purgeInterval));
rv = SearchFolderToPurge(junkFolder, purgeInterval);
break;
}
@ -366,7 +372,6 @@ nsresult nsMsgPurgeService::SearchFolderToPurge(nsIMsgFolder *folder, PRInt32 pu
NS_IMETHODIMP nsMsgPurgeService::OnNewSearch()
{
PR_LOG(MsgPurgeLogModule, PR_LOG_ALWAYS, ("on new search"));
return NS_OK;
}

View File

@ -239,14 +239,23 @@ NS_IMETHODIMP nsNoIncomingServer::GetNewMail(nsIMsgWindow *aMsgWindow, nsIUrlLis
NS_IMETHODIMP
nsNoIncomingServer::GetFilterList(nsIMsgWindow *aMsgWindow, nsIMsgFilterList **aResult)
{
return NS_ERROR_NOT_IMPLEMENTED;
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP
nsNoIncomingServer::GetCanSearchMessages(PRBool *canSearchMessages)
{
NS_ENSURE_ARG_POINTER(canSearchMessages);
*canSearchMessages = PR_TRUE;
return NS_OK;
NS_ENSURE_ARG_POINTER(canSearchMessages);
*canSearchMessages = PR_TRUE;
return NS_OK;
}
NS_IMETHODIMP
nsNoIncomingServer::GetServerRequiresPasswordForBiff(PRBool *aServerRequiresPasswordForBiff)
{
NS_ENSURE_ARG_POINTER(aServerRequiresPasswordForBiff);
*aServerRequiresPasswordForBiff = PR_FALSE; // for local folders, we don't require a password
return NS_OK;
}

View File

@ -61,6 +61,7 @@ public:
NS_IMETHOD GetLocalStoreType(char * *type);
NS_IMETHOD GetFilterList(nsIMsgWindow *aMsgWindow, nsIMsgFilterList **aResult);
NS_IMETHOD GetCanSearchMessages(PRBool *canSearchMessages);
NS_IMETHOD GetServerRequiresPasswordForBiff(PRBool *aServerRequiresPasswordForBiff);
};