# HG changeset patch # User Kim Alvefur # Date 1410958072 -7200 # Node ID 31c15004bfb07b3cdf08bd77b038a49e8417bbc2 # Parent a552f4170aed5ca005c96179d51c896abf304d00 core.moduleapi: Use require instead of global to get storagemanager in module:open_store() diff -r a552f4170aed -r 31c15004bfb0 core/moduleapi.lua --- a/core/moduleapi.lua Wed Sep 17 14:30:29 2014 +0200 +++ b/core/moduleapi.lua Wed Sep 17 14:47:52 2014 +0200 @@ -19,6 +19,7 @@ local error, setmetatable, type = error, setmetatable, type; local ipairs, pairs, select, unpack = ipairs, pairs, select, unpack; local tonumber, tostring = tonumber, tostring; +local require = require; local prosody = prosody; local hosts = prosody.hosts; @@ -366,7 +367,7 @@ end function api:open_store(name, type) - return storagemanager.open(self.host, name or self.name, type); + return require"core.storagemanager".open(self.host, name or self.name, type); end return api;