Software /
code /
prosody
Diff
core/modulemanager.lua @ 2072:464a5392bc80
modulemanager: api:get_option(): Handle correctly option values of boolean false, don't assume value unset
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Sun, 08 Nov 2009 15:09:11 +0000 |
parent | 1994:9cc9b096c8f5 |
child | 2151:3bb7c1daa93f |
child | 2828:fbddc3ed0d09 |
line wrap: on
line diff
--- a/core/modulemanager.lua Fri Nov 06 23:56:10 2009 +0000 +++ b/core/modulemanager.lua Sun Nov 08 15:09:11 2009 +0000 @@ -390,7 +390,14 @@ end function api:get_option(name, default_value) - return config.get(self.host, self.name, name) or config.get(self.host, "core", name) or default_value; + local value = config.get(self.host, self.name, name); + if value == nil then + value = config.get(self.host, "core", name); + if value == nil then + value = default_value; + end + end + return value; end local t_remove = _G.table.remove;