core/moduleapi.lua
changeset 4660 96b40b5e8ea8
parent 4651 d1739d72100a
child 4661 76db5d0a2104
--- a/core/moduleapi.lua	Sun Apr 22 23:44:21 2012 +0500
+++ b/core/moduleapi.lua	Mon Apr 23 14:09:35 2012 +0100
@@ -298,7 +298,7 @@
 function api:provides(name, item)
 	if not item then item = self.environment; end
 	if not item.name then
-		local item_name = module.name;
+		local item_name = self.name;
 		-- Strip a provider prefix to find the item name
 		-- (e.g. "auth_foo" -> "foo" for an auth provider)
 		if item_name:find(name.."_", 1, true) == 1 then