aboutsummaryrefslogtreecommitdiffstats
path: root/core/moduleapi.lua
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2015-08-20 13:05:22 +0200
committerKim Alvefur <zash@zash.se>2015-08-20 13:05:22 +0200
commit6ef7c4d80892f486d71e660b054bdfdb993c8528 (patch)
tree103fd7d9396b60b9f76071a009c54d3ca9d35744 /core/moduleapi.lua
parenta9029bd099734436154fc4e794d3b958e54d1943 (diff)
parentd32f36b2817739d7f8d5f1208a3009b7be379562 (diff)
downloadprosody-6ef7c4d80892f486d71e660b054bdfdb993c8528.tar.gz
prosody-6ef7c4d80892f486d71e660b054bdfdb993c8528.zip
Merge 0.10->trunk
Diffstat (limited to 'core/moduleapi.lua')
-rw-r--r--core/moduleapi.lua8
1 files changed, 2 insertions, 6 deletions
diff --git a/core/moduleapi.lua b/core/moduleapi.lua
index bb802195..114a97a7 100644
--- a/core/moduleapi.lua
+++ b/core/moduleapi.lua
@@ -7,7 +7,6 @@
--
local config = require "core.configmanager";
-local modulemanager; -- This gets set from modulemanager
local array = require "util.array";
local set = require "util.set";
local it = require "util.iterators";
@@ -147,6 +146,7 @@ function api:require(lib)
end
function api:depends(name)
+ local modulemanager = require"core.modulemanager";
if not self.dependencies then
self.dependencies = {};
self:hook("module-reloaded", function (event)
@@ -328,6 +328,7 @@ function api:remove_item(key, value)
end
function api:get_host_items(key)
+ local modulemanager = require"core.modulemanager";
local result = modulemanager.get_items(key, self.host) or {};
return result;
end
@@ -437,9 +438,4 @@ function api:measure_global_event(event_name, stat_name)
return self:measure_object_event(prosody.events.wrappers, event_name, stat_name);
end
-function api.init(mm)
- modulemanager = mm;
- return api;
-end
-
return api;