aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mod_storage_sql2.lua
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2014-02-12 19:26:54 +0100
committerKim Alvefur <zash@zash.se>2014-02-12 19:26:54 +0100
commit08f04b1419c2c8878d3836d11cd7af806a083898 (patch)
tree6eb49f8bddde74f4f7a621d0fb2770d60c093b4f /plugins/mod_storage_sql2.lua
parentdb97ec41b600653e046c0d6ee7c2625105a5a761 (diff)
parenta0ece01720887a029783f813da186d624aa41ba8 (diff)
downloadprosody-08f04b1419c2c8878d3836d11cd7af806a083898.tar.gz
prosody-08f04b1419c2c8878d3836d11cd7af806a083898.zip
Merge 0.10 -> trunk
Diffstat (limited to 'plugins/mod_storage_sql2.lua')
-rw-r--r--plugins/mod_storage_sql2.lua4
1 files changed, 4 insertions, 0 deletions
diff --git a/plugins/mod_storage_sql2.lua b/plugins/mod_storage_sql2.lua
index 90e9ead0..7a2ec4a7 100644
--- a/plugins/mod_storage_sql2.lua
+++ b/plugins/mod_storage_sql2.lua
@@ -325,6 +325,10 @@ function archive_store:delete(username, query)
local sql_query = "DELETE FROM `prosodyarchive` WHERE %s;";
local args = { host, user or "", store, };
local where = { "`host` = ?", "`user` = ?", "`store` = ?", };
+ if user == true then
+ table.remove(args, 2);
+ table.remove(where, 2);
+ end
archive_where(query, args, where);
archive_where_id_range(query, args, where);
sql_query = sql_query:format(t_concat(where, " AND "));