From: Mikhail Galanin Date: Tue, 31 Jul 2018 09:06:53 +0000 (+0100) Subject: [Fix] Fixed issues reported by luacheck X-Git-Tag: 1.7.9~5^2~2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=8da3d333136e031cd4888dbd850eb60406cee5e7;p=rspamd.git [Fix] Fixed issues reported by luacheck --- diff --git a/lualib/lua_util.lua b/lualib/lua_util.lua index c43286d8b..86cbc9ff4 100644 --- a/lualib/lua_util.lua +++ b/lualib/lua_util.lua @@ -505,7 +505,7 @@ exports.override_defaults = override_defaults -- their characteristics --]] -- exports.extract_specific_urls = function(params_or_task, limit, need_emails, filter, prefix) -exports.extract_specific_urls = function(params_or_task, limit, need_emails, filter, prefix) +exports.extract_specific_urls = function(params_or_task, lim, need_emails, filter, prefix) local default_params = { limit = 9999, esld_limit = 9999, @@ -515,20 +515,20 @@ exports.extract_specific_urls = function(params_or_task, limit, need_emails, fil } local params - if type(params_or_task) == 'table' and type(limit) == 'nil' then + if type(params_or_task) == 'table' and type(lim) == 'nil' then params = params_or_task else -- Deprecated call params = { task = params_or_task, - limit = limit, + limit = lim, need_emails = need_emails, filter = filter, prefix = prefix } end for k,v in pairs(default_params) do - if not params[k] then params[k] = default_params[k] end + if not params[k] then params[k] = v end end