From 08ab14332445b35a9907e0346822b5faeb4b1c30 Mon Sep 17 00:00:00 2001 From: "dmose%netscape.com" Date: Sun, 15 Sep 2002 19:28:28 +0000 Subject: [PATCH] Use threshhold from prefs git-svn-id: svn://10.0.0.236/branches/MOZ_FILTER_BRANCH@129657 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/other-licenses/junkmail/junkmail.js | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/mozilla/other-licenses/junkmail/junkmail.js b/mozilla/other-licenses/junkmail/junkmail.js index 1382c830674..50575807d03 100644 --- a/mozilla/other-licenses/junkmail/junkmail.js +++ b/mozilla/other-licenses/junkmail/junkmail.js @@ -263,6 +263,14 @@ function nsJunkmail() {} nsJunkmail.prototype = { + move: true, + + threshhold: 255.0, + + logStream: {}, + + dummyFilterObj: {}, + init: function(aServerPrefsKey) { if (!gPrefs) { @@ -287,6 +295,10 @@ nsJunkmail.prototype = { + "@" + gPrefs.getCharPref("mail.server." + aServerPrefsKey + ".hostname") + "/Junk Mail"); + + this.threshhold = Number( + gPrefs.getCharPref("mail.server." + aServerPrefsKey + + ".junkmail.threshhold")); // the logfile is called "junklog.txt" in the server directory // XXX needs to a complex pref @@ -627,7 +639,7 @@ nsJunkmail.prototype = { // XXX don't hardcode this // aMsgHdr.setStringProperty("score", msgScore); - if (msgScore >= 3.1) { + if (msgScore >= this.threshhold) { aListener.applyFilterHit(this.dummyFilterObj, aMsgWindow); }