Comparison

plugins/mod_storage_sql2.lua @ 6728:db28b8639737

mod_storage_sql2: Fix argument compat thing from 41725f3df3cc, it was backwards
author Kim Alvefur <zash@zash.se>
date Thu, 21 May 2015 12:11:08 +0200
parent 6726:e6e80ec50030
child 6729:daa5c83b2879
child 6740:99b3f29c3c71
comparison
equal deleted inserted replaced
6726:e6e80ec50030 6728:db28b8639737
219 total = true; 219 total = true;
220 }; 220 };
221 archive_store.__index = archive_store 221 archive_store.__index = archive_store
222 function archive_store:append(username, key, value, when, with) 222 function archive_store:append(username, key, value, when, with)
223 if type(when) ~= "number" then 223 if type(when) ~= "number" then
224 value, when, with = when, with, value; 224 when, with, value = value, when, with;
225 end 225 end
226 local user,store = username,self.store; 226 local user,store = username,self.store;
227 return engine:transaction(function() 227 return engine:transaction(function()
228 if key then 228 if key then
229 engine:delete("DELETE FROM `prosodyarchive` WHERE `host`=? AND `user`=? AND `store`=? AND `key`=?", host, user or "", store, key); 229 engine:delete("DELETE FROM `prosodyarchive` WHERE `host`=? AND `user`=? AND `store`=? AND `key`=?", host, user or "", store, key);