aboutsummaryrefslogtreecommitdiffstats
path: root/core/modulemanager.lua
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2009-11-08 15:09:11 +0000
committerMatthew Wild <mwild1@gmail.com>2009-11-08 15:09:11 +0000
commit581c6ab9d1d9a20fd410548410f5b4e82d12346c (patch)
tree810a2e4be010f4666a4739cc306a1db3e970ff9f /core/modulemanager.lua
parentcf460170b5bbdbf2c952257eb01de94a336cda40 (diff)
downloadprosody-581c6ab9d1d9a20fd410548410f5b4e82d12346c.tar.gz
prosody-581c6ab9d1d9a20fd410548410f5b4e82d12346c.zip
modulemanager: api:get_option(): Handle correctly option values of boolean false, don't assume value unset
Diffstat (limited to 'core/modulemanager.lua')
-rw-r--r--core/modulemanager.lua9
1 files changed, 8 insertions, 1 deletions
diff --git a/core/modulemanager.lua b/core/modulemanager.lua
index 88d07f43..9cd56187 100644
--- a/core/modulemanager.lua
+++ b/core/modulemanager.lua
@@ -390,7 +390,14 @@ function api:require(lib)
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;