From: Vsevolod Stakhov Date: Wed, 24 Jul 2019 12:40:40 +0000 (+0100) Subject: [Minor] Rename method name X-Git-Tag: 2.0~499 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=701a711049ee01373bc3862cc441fc3065c8dbc2;p=rspamd.git [Minor] Rename method name --- diff --git a/conf/statistic.conf b/conf/statistic.conf index bb76853ca..1e78c73cd 100644 --- a/conf/statistic.conf +++ b/conf/statistic.conf @@ -41,7 +41,7 @@ classifier "bayes" { symbol = "BAYES_SPAM"; spam = true; } - learn_condition = "return require("lua_bayes_learn").autolearn" + learn_condition = "return require("lua_bayes_learn").can_learn" .include(try=true; priority=1) "$LOCAL_CONFDIR/local.d/classifier-bayes.conf" .include(try=true; priority=10) "$LOCAL_CONFDIR/override.d/classifier-bayes.conf" diff --git a/lualib/lua_bayes_learn.lua b/lualib/lua_bayes_learn.lua index 70cbb96c0..7df52a2ef 100644 --- a/lualib/lua_bayes_learn.lua +++ b/lualib/lua_bayes_learn.lua @@ -18,7 +18,7 @@ limitations under the License. local exports = {} -exports.autolearn = function(task, is_spam, is_unlearn) +exports.can_learn = function(task, is_spam, is_unlearn) local learn_type = task:get_request_header('Learn-Type') if not (learn_type and tostring(learn_type) == 'bulk') then