From 27a5c819f44a16fd8f6dfae24ed53dcc4366ff67 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Tue, 19 May 2015 18:24:09 +0200 Subject: mod_storage_sql2: Change order of arguments to :append to be the same as return values from :find iterator --- plugins/mod_storage_sql2.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'plugins/mod_storage_sql2.lua') diff --git a/plugins/mod_storage_sql2.lua b/plugins/mod_storage_sql2.lua index c02ad42c..aab37697 100644 --- a/plugins/mod_storage_sql2.lua +++ b/plugins/mod_storage_sql2.lua @@ -216,9 +216,9 @@ end local archive_store = {} archive_store.__index = archive_store -function archive_store:append(username, key, when, with, value) - if value == nil then -- COMPAT early versions - when, with, value, key = key, when, with, value +function archive_store:append(username, key, value, when, with) + if type(when) ~= "number" then + value, when, with = when, with, value; end local user,store = username,self.store; return engine:transaction(function() -- cgit v1.2.3