aboutsummaryrefslogtreecommitdiffstats
path: root/core/moduleapi.lua
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2014-09-17 14:47:52 +0200
committerKim Alvefur <zash@zash.se>2014-09-17 14:47:52 +0200
commita36064641e6e86cbec49d67c615c6ba60cea4f4a (patch)
tree360e5b3a4de2c16ad16b429011ac64682f8c7914 /core/moduleapi.lua
parent8affcc3ff7d35ca73fe748418046bec386496cd2 (diff)
downloadprosody-a36064641e6e86cbec49d67c615c6ba60cea4f4a.tar.gz
prosody-a36064641e6e86cbec49d67c615c6ba60cea4f4a.zip
core.moduleapi: Use require instead of global to get storagemanager in module:open_store()
Diffstat (limited to 'core/moduleapi.lua')
-rw-r--r--core/moduleapi.lua3
1 files changed, 2 insertions, 1 deletions
diff --git a/core/moduleapi.lua b/core/moduleapi.lua
index 8b477140..887ba858 100644
--- a/core/moduleapi.lua
+++ b/core/moduleapi.lua
@@ -19,6 +19,7 @@ local t_insert, t_remove, t_concat = table.insert, table.remove, table.concat;
local error, setmetatable, type = error, setmetatable, type;
local ipairs, pairs, select, unpack = ipairs, pairs, select, unpack;
local tonumber, tostring = tonumber, tostring;
+local require = require;
local prosody = prosody;
local hosts = prosody.hosts;
@@ -366,7 +367,7 @@ function api:load_resource(path, mode)
end
function api:open_store(name, type)
- return storagemanager.open(self.host, name or self.name, type);
+ return require"core.storagemanager".open(self.host, name or self.name, type);
end
return api;