# HG changeset patch # User Matthew Wild # Date 1436198825 -3600 # Node ID 3cc2bc9c1bff487023a074b6c08e6cc7695710c1 # Parent 2a2eb30b1ed4d50aabb1bf5661b553e9f22ce621# Parent 18f18bceb66226c3f224060c65b0025682899541 Merge with 0.10 diff -r 2a2eb30b1ed4 -r 3cc2bc9c1bff plugins/mod_storage_sql2.lua --- a/plugins/mod_storage_sql2.lua Mon Jun 29 13:50:31 2015 +0100 +++ b/plugins/mod_storage_sql2.lua Mon Jul 06 17:07:05 2015 +0100 @@ -379,10 +379,10 @@ end local function normalize_params(params) - assert(params.driver and params.database, "Configuration error: Both the SQL driver and the database need to be specified"); if params.driver == "SQLite3" then params.database = resolve_relative_path(prosody.paths.data or ".", params.database or "prosody.sqlite"); end + assert(params.driver and params.database, "Configuration error: Both the SQL driver and the database need to be specified"); return params; end diff -r 2a2eb30b1ed4 -r 3cc2bc9c1bff plugins/muc/mod_muc.lua --- a/plugins/muc/mod_muc.lua Mon Jun 29 13:50:31 2015 +0100 +++ b/plugins/muc/mod_muc.lua Mon Jul 06 17:07:05 2015 +0100 @@ -60,7 +60,7 @@ return _get_affiliation(self, jid); end function muclib.room_mt:set_affiliation(actor, jid, affiliation, callback, reason) - if is_admin(jid) then return nil, "modify", "not-acceptable"; end + if affiliation ~= "owner" and is_admin(jid) then return nil, "modify", "not-acceptable"; end return _set_affiliation(self, actor, jid, affiliation, callback, reason); end diff -r 2a2eb30b1ed4 -r 3cc2bc9c1bff plugins/sql.lib.lua --- a/plugins/sql.lib.lua Mon Jun 29 13:50:31 2015 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,9 +0,0 @@ -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; diff -r 2a2eb30b1ed4 -r 3cc2bc9c1bff prosodyctl --- a/prosodyctl Mon Jun 29 13:50:31 2015 +0100 +++ b/prosodyctl Mon Jul 06 17:07:05 2015 +0100 @@ -841,7 +841,8 @@ }); local known_global_options = set.new({ "pidfile", "log", "plugin_paths", "prosody_user", "prosody_group", "daemonize", - "umask", "prosodyctl_timeout", "use_ipv6", "use_libevent", "network_settings" + "umask", "prosodyctl_timeout", "use_ipv6", "use_libevent", "network_settings", + "network_backend", "http_default_host", }); local config = config.getconfig(); -- Check that we have any global options (caused by putting a host at the top) diff -r 2a2eb30b1ed4 -r 3cc2bc9c1bff util/sql.lua --- a/util/sql.lua Mon Jun 29 13:50:31 2015 +0100 +++ b/util/sql.lua Mon Jul 06 17:07:05 2015 +0100 @@ -111,8 +111,12 @@ self.conn = dbh; self.prepared = {}; self:set_encoding(); + self:onconnect(); return true; end +function engine:onconnect() + -- Override from create_engine() +end function engine:execute(sql, ...) local success, err = self:connect(); if not success then return success, err; end