Software /
code /
prosody
Comparison
plugins/mod_storage_sql.lua @ 8029:e859f279add4
mod_storage_sql: Remove compat for argument order change
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sat, 01 Apr 2017 19:02:27 +0200 |
parent | 7907:8e2446cdf6fa |
child | 8031:ef838b7f8f53 |
comparison
equal
deleted
inserted
replaced
8025:8a7c4497569a | 8029:e859f279add4 |
---|---|
181 archive_store.caps = { | 181 archive_store.caps = { |
182 total = true; | 182 total = true; |
183 }; | 183 }; |
184 archive_store.__index = archive_store | 184 archive_store.__index = archive_store |
185 function archive_store:append(username, key, value, when, with) | 185 function archive_store:append(username, key, value, when, with) |
186 if type(when) ~= "number" then | |
187 when, with, value = value, when, with; | |
188 end | |
189 local user,store = username,self.store; | 186 local user,store = username,self.store; |
190 local ok, key = engine:transaction(function() | 187 local ok, key = engine:transaction(function() |
191 if key then | 188 if key then |
192 engine:delete("DELETE FROM `prosodyarchive` WHERE `host`=? AND `user`=? AND `store`=? AND `key`=?", host, user or "", store, key); | 189 engine:delete("DELETE FROM `prosodyarchive` WHERE `host`=? AND `user`=? AND `store`=? AND `key`=?", host, user or "", store, key); |
193 else | 190 else |