aboutsummaryrefslogtreecommitdiffstats
path: root/core/moduleapi.lua
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2014-09-17 14:48:49 +0200
committerKim Alvefur <zash@zash.se>2014-09-17 14:48:49 +0200
commit93a297bc8ffd909ff006d664e1e824d8a9307cba (patch)
tree25b2e671f9d80fb19bd32037cf716a9557de7f6c /core/moduleapi.lua
parenta36064641e6e86cbec49d67c615c6ba60cea4f4a (diff)
downloadprosody-93a297bc8ffd909ff006d664e1e824d8a9307cba.tar.gz
prosody-93a297bc8ffd909ff006d664e1e824d8a9307cba.zip
core.modulemanager, core.moduleapi: Hack around dependency loop
Diffstat (limited to 'core/moduleapi.lua')
-rw-r--r--core/moduleapi.lua7
1 files changed, 5 insertions, 2 deletions
diff --git a/core/moduleapi.lua b/core/moduleapi.lua
index 887ba858..e5f86b37 100644
--- a/core/moduleapi.lua
+++ b/core/moduleapi.lua
@@ -7,7 +7,7 @@
--
local config = require "core.configmanager";
-local modulemanager = require "modulemanager"; -- This is necessary to avoid require loops
+local modulemanager; -- This gets set from modulemanager
local array = require "util.array";
local set = require "util.set";
local logger = require "util.logger";
@@ -370,4 +370,7 @@ function api:open_store(name, type)
return require"core.storagemanager".open(self.host, name or self.name, type);
end
-return api;
+return function (mm)
+ modulemanager = mm;
+ return api;
+end