Software /
code /
prosody
Changeset
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 |
parents | 2071:d59537f54c24 |
children | 2073:72784ce0c0e0 |
files | core/modulemanager.lua |
diffstat | 1 files changed, 8 insertions(+), 1 deletions(-) [+] |
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;