File

plugins/sql.lib.lua @ 6575:bdaadf70a48f

util.datamanager: Check that the global 'prosody' exists before using it (fixes nil indexing in use outside of prosody)
author Kim Alvefur <zash@zash.se>
date Fri, 20 Feb 2015 19:00:01 +0100
parent 5494:9916f0a2d178
line wrap: on
line source

local cache = module:shared("/*/sql.lib/util.sql");

if not cache._M then
	prosody.unlock_globals();
	cache._M = require "util.sql";
	prosody.lock_globals();
end

return cache._M;