moduleapi: module:depends(): Load shared modules onto the current host even if they are loaded globally already
--- a/core/moduleapi.lua Mon Apr 23 14:11:10 2012 +0100
+++ b/core/moduleapi.lua Mon Apr 23 14:15:07 2012 +0100
@@ -120,6 +120,9 @@
end);
end
local mod = modulemanager.get_module(self.host, name) or modulemanager.get_module("*", name);
+ if mod and mod.module.host == "*" and modulemanager.module_has_method(mod, "add_host") then
+ mod = nil; -- This is a shared module, so we still want to load it on our host
+ end
if not mod then
local err;
mod, err = modulemanager.load(self.host, name);