moduleapi: Make module:open_store() open a store named after the calling module by default
authorKim Alvefur <zash@zash.se>
Fri, 19 Apr 2013 14:42:32 +0200
changeset 5498 2a67235e1d4d
parent 5496 7a0b81b5ca71
child 5499 063d1f706ba7
child 5500 eeea0eb2602a
moduleapi: Make module:open_store() open a store named after the calling module by default
core/moduleapi.lua
--- a/core/moduleapi.lua	Fri Apr 19 13:29:47 2013 +0100
+++ b/core/moduleapi.lua	Fri Apr 19 14:42:32 2013 +0200
@@ -338,7 +338,7 @@
 end
 
 function api:open_store(name, type)
-	return storagemanager.open(self.host, name, type);
+	return storagemanager.open(self.host, name or self.name, type);
 end
 
 return api;