]> git.ipfire.org Git - thirdparty/rspamd.git/commitdiff
Fix for lua 5.2.
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Fri, 5 Sep 2014 12:43:33 +0000 (13:43 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Fri, 5 Sep 2014 12:43:33 +0000 (13:43 +0100)
conf/lua/rspamd.classifiers.lua

index 4820dd77a1746ffb9a9a04a5ec24c104191970ff..3ba1c0fc698ae86ab03997734bfde15d32b6ea8b 100644 (file)
@@ -10,6 +10,11 @@ local has_in_reply_label = 'reply message'
 
 -- Get specific statfiles set based on message rules
 local function get_specific_statfiles(classifier, task)
+       if not table.foreach then
+               table.foreach = function(t, f)
+                       for k, v in pairs(t) do f(k, v) end
+               end
+       end
        local spec_st = {}
        -- More 5 recipients
        local st_many = classifier:get_statfile_by_label(many_recipients_label)