Changeset

6725:41725f3df3cc

mod_storage_sql2: Change order of arguments to :append to be the same as return values from :find iterator
author Kim Alvefur <zash@zash.se>
date Tue, 19 May 2015 18:24:09 +0200
parents 6724:a8dbfa14e1a8
children 6726:e6e80ec50030
files plugins/mod_storage_sql2.lua
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/plugins/mod_storage_sql2.lua	Tue May 19 18:21:23 2015 +0200
+++ b/plugins/mod_storage_sql2.lua	Tue May 19 18:24:09 2015 +0200
@@ -216,9 +216,9 @@
 
 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()