# HG changeset patch # User Matthew Wild # Date 1375805843 -3600 # Node ID c4ed6680bf8d39eb2a71563d5c14ae00256d30d1 # Parent 7722372aa087fe7920b51611ef8baf523a44cc24 moduleapi: module:get_host_type() now returns 'global' for * and 'local' for non-components diff -r 7722372aa087 -r c4ed6680bf8d core/moduleapi.lua --- a/core/moduleapi.lua Tue Aug 06 14:35:03 2013 +0200 +++ b/core/moduleapi.lua Tue Aug 06 17:17:23 2013 +0100 @@ -44,7 +44,7 @@ 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()