From c8e0c8a63bd2e0a7604c4bb5a637287e7ddffc25 Mon Sep 17 00:00:00 2001 From: Matthew Wild Date: Tue, 6 Aug 2013 17:17:23 +0100 Subject: moduleapi: module:get_host_type() now returns 'global' for * and 'local' for non-components --- core/moduleapi.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'core') diff --git a/core/moduleapi.lua b/core/moduleapi.lua index ed75669b..a4ba9bc8 100644 --- a/core/moduleapi.lua +++ b/core/moduleapi.lua @@ -44,7 +44,7 @@ function api:get_host() end function api:get_host_type() - return self.host ~= "*" and hosts[self.host].type or nil; + return (self.host == "*" and "global") or hosts[self.host].type or "local"; end function api:set_global() -- cgit v1.2.3