Changeset

4660:96b40b5e8ea8

moduleapi: module:provides(): Fix usage of wrong table
author Matthew Wild <mwild1@gmail.com>
date Mon, 23 Apr 2012 14:09:35 +0100
parents 4659:d53142e90cd0
children 4661:76db5d0a2104
files core/moduleapi.lua
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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