]> source.dussan.org Git - rspamd.git/commitdiff
Fix user/language learn count in sqlite statistics (#496) 504/head
authorAndrew Lewis <nerf@judo.za.org>
Tue, 26 Jan 2016 16:11:14 +0000 (18:11 +0200)
committerAndrew Lewis <nerf@judo.za.org>
Tue, 26 Jan 2016 16:11:14 +0000 (18:11 +0200)
src/libstat/backends/sqlite3_backend.c

index 0983236bca28415daea8706e0e8830b3b48f5d37..7f57636e442f0068e8b21c758a91c5d1fefb70a6 100644 (file)
@@ -887,7 +887,7 @@ rspamd_sqlite3_inc_learns (struct rspamd_task *task, gpointer runtime,
        bk = rt->db;
        rspamd_sqlite3_run_prstmt (task->task_pool, bk->sqlite, bk->prstmt,
                        RSPAMD_STAT_BACKEND_INC_LEARNS,
-                       rt->user_id, rt->lang_id);
+                       rt->lang_id, rt->user_id);
 
        if (bk->in_transaction) {
                rspamd_sqlite3_run_prstmt (task->task_pool, bk->sqlite, bk->prstmt,
@@ -913,7 +913,7 @@ rspamd_sqlite3_dec_learns (struct rspamd_task *task, gpointer runtime,
        bk = rt->db;
        rspamd_sqlite3_run_prstmt (task->task_pool, bk->sqlite, bk->prstmt,
                        RSPAMD_STAT_BACKEND_DEC_LEARNS,
-                       rt->user_id, rt->lang_id);
+                       rt->lang_id, rt->user_id);
 
        if (bk->in_transaction) {
                rspamd_sqlite3_run_prstmt (task->task_pool, bk->sqlite, bk->prstmt,