aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2011-12-10 17:21:19 +0000
committerMatthew Wild <mwild1@gmail.com>2011-12-10 17:21:19 +0000
commitb803655fc3922d51ccfb44eebe8540e3ba562b2b (patch)
treef66aa3f37b83c771b56de6cf9833a8edc7152af8
parentd531e402d09d48774806fead2b497d34ea8d79c1 (diff)
downloadprosody-b803655fc3922d51ccfb44eebe8540e3ba562b2b.tar.gz
prosody-b803655fc3922d51ccfb44eebe8540e3ba562b2b.zip
configmanager: get(): Make section (core) optional (hurrah)
-rw-r--r--core/configmanager.lua3
1 files changed, 3 insertions, 0 deletions
diff --git a/core/configmanager.lua b/core/configmanager.lua
index 85919492..e2253171 100644
--- a/core/configmanager.lua
+++ b/core/configmanager.lua
@@ -41,6 +41,9 @@ function getconfig()
end
function get(host, section, key)
+ if not key then
+ section, key = "core", section;
+ end
local sec = config[host][section];
if sec then
return sec[key];