Fix disabled user script value

This commit is contained in:
emanuele-f 2020-01-23 19:30:57 +01:00
parent 018e426887
commit 33ae78c34f

View file

@ -51,8 +51,11 @@ function DefaultTemplate:parseConfig(script, conf)
end
function DefaultTemplate:describeConfig(script, hooks_conf)
if(hooks_conf.all and hooks_conf.all.enabled) then
return i18n("enabled")
-- Assumption: table length is 1
for _, hook in pairs(hooks_conf) do
if hook.enabled then
return i18n("enabled")
end
end
return i18n("disabled")