aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2016-11-15 15:29:08 +0000
committerGitHub <noreply@github.com>2016-11-15 15:29:08 +0000
commit9e517e2fc15cb56dc48059fa3c80a4fb96e838b6 (patch)
treeb748ab324abb40416ee77b8d36d0fcd710338648
parent1ecdbd939d072079717dfb7f0fb56fb1b77e7ca8 (diff)
parent0de723b453f0720e4031c83aacf7f84227446ec7 (diff)
downloadrspamd-9e517e2fc15cb56dc48059fa3c80a4fb96e838b6.tar.gz
rspamd-9e517e2fc15cb56dc48059fa3c80a4fb96e838b6.zip
Merge pull request #1135 from fatalbanana/e
[Minor] Fix invocation of fun.each
-rw-r--r--rules/rspamd.classifiers.lua10
1 files changed, 5 insertions, 5 deletions
diff --git a/rules/rspamd.classifiers.lua b/rules/rspamd.classifiers.lua
index 1fb10a2f8..1212fd933 100644
--- a/rules/rspamd.classifiers.lua
+++ b/rules/rspamd.classifiers.lua
@@ -32,7 +32,7 @@ local function get_specific_statfiles(classifier, task)
if st_many then
local rcpt = task:get_recipients(2)
if rcpt and #rcpt > 5 then
- fun.each(function(_,v) table.insert(spec_st,v) end, st_many)
+ fun.each(function(v) table.insert(spec_st,v) end, st_many)
end
end
-- Undisclosed
@@ -40,7 +40,7 @@ local function get_specific_statfiles(classifier, task)
if st_undisc then
local rcpt = task:get_recipients(2)
if rcpt and #rcpt == 0 then
- fun.each(function(_,v) table.insert(spec_st,v) end, st_undisc)
+ fun.each(function(v) table.insert(spec_st,v) end, st_undisc)
end
end
-- Maillist
@@ -48,7 +48,7 @@ local function get_specific_statfiles(classifier, task)
if st_maillist then
local unsub_header = task:get_header_raw('List-Unsubscribe')
if unsub_header then
- fun.each(function(_,v) table.insert(spec_st,v) end, st_maillist)
+ fun.each(function(v) table.insert(spec_st,v) end, st_maillist)
end
end
-- Long subject
@@ -56,7 +56,7 @@ local function get_specific_statfiles(classifier, task)
if st_longsubj then
local subj = task:get_header_raw('Subject')
if subj and string.len(subj) > 150 then
- fun.each(function(_,v) table.insert(spec_st,v) end, st_longsubj)
+ fun.each(function(v) table.insert(spec_st,v) end, st_longsubj)
end
end
@@ -88,7 +88,7 @@ classifiers['bayes'] = function(classifier, task, is_learn)
return spec_st
else
-- Merge tables
- fun.each(function(_,v) table.insert(selected,v) end, spec_st)
+ fun.each(function(v) table.insert(selected,v) end, spec_st)
end
end
-- Detect statfile by language