modulemanager: Added module API function to get all items for a given host based on a key
--- a/core/modulemanager.lua Tue Aug 18 12:34:59 2009 +0500
+++ b/core/modulemanager.lua Tue Aug 18 12:35:42 2009 +0500
@@ -443,6 +443,19 @@
end
end
+function api:get_host_items(key)
+ local result = {};
+ for mod_name, module in pairs(modulemap[self.host]) do
+ module = module.module;
+ if module.items then
+ for _, item in ipairs(module.items[key] or NULL) do
+ t_insert(result, item);
+ end
+ end
+ end
+ return result;
+end
+
--------------------------------------------------------------------
local actions = {};