diff options
author | Andrew Lewis <nerf@judo.za.org> | 2016-11-03 17:11:28 +0200 |
---|---|---|
committer | Andrew Lewis <nerf@judo.za.org> | 2016-11-03 17:11:28 +0200 |
commit | 1c4aca84aacb4c95664f5c72897640c62d506272 (patch) | |
tree | cb1af447c99b38b1f9b90c0db4fceeeb47830f4d /rules | |
parent | 02a2e48fb60ec36b317497e21cf8df56b40aa73c (diff) | |
download | rspamd-1c4aca84aacb4c95664f5c72897640c62d506272.tar.gz rspamd-1c4aca84aacb4c95664f5c72897640c62d506272.zip |
[Minor] Kill a few more globals
Diffstat (limited to 'rules')
-rw-r--r-- | rules/rspamd.classifiers.lua | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/rules/rspamd.classifiers.lua b/rules/rspamd.classifiers.lua index 77f506ee8..1b83b4eb4 100644 --- a/rules/rspamd.classifiers.lua +++ b/rules/rspamd.classifiers.lua @@ -33,7 +33,7 @@ local function get_specific_statfiles(classifier, task) -- More 5 recipients local st_many = classifier:get_statfile_by_label(many_recipients_label) if st_many then - rcpt = task:get_recipients(2) + local rcpt = task:get_recipients(2) if rcpt and #rcpt > 5 then table.foreach(st_many, function(i,v) table.insert(spec_st,v) end) end @@ -41,7 +41,7 @@ local function get_specific_statfiles(classifier, task) -- Undisclosed local st_undisc = classifier:get_statfile_by_label(undisclosed_recipients_label) if st_undisc then - rcpt = task:get_recipients(2) + local rcpt = task:get_recipients(2) if rcpt and #rcpt == 0 then table.foreach(st_undisc, function(i,v) table.insert(spec_st,v) end) end @@ -95,7 +95,7 @@ classifiers['bayes'] = function(classifier, task, is_learn, is_spam) end end -- Detect statfile by language - language = detect_language(task) + local language = detect_language(task) if language then -- Find statfiles with specified language for _,st in ipairs(classifier:get_statfiles()) do |