From 3a11d23a2f32a1b9b2ec43429917c000017c5eff Mon Sep 17 00:00:00 2001 From: Marius Cramer <m.cramer@pixcept.de> Date: Wed, 15 Apr 2015 05:18:57 -0400 Subject: [PATCH] - changed code to use new method of passing values to datalogUpdate and datalogInsert --- interface/web/mailuser/mail_user_spamfilter_edit.php | 17 ++++++++++++++--- 1 files changed, 14 insertions(+), 3 deletions(-) diff --git a/interface/web/mailuser/mail_user_spamfilter_edit.php b/interface/web/mailuser/mail_user_spamfilter_edit.php index 335aaec..9d37356 100644 --- a/interface/web/mailuser/mail_user_spamfilter_edit.php +++ b/interface/web/mailuser/mail_user_spamfilter_edit.php @@ -82,11 +82,22 @@ if($policy_id > 0) { if($tmp_user["id"] > 0) { // There is already a record that we will update - $app->db->datalogUpdate('spamfilter_users', "policy_id = $policy_id", 'id', $tmp_user["id"]); + $app->db->datalogUpdate('spamfilter_users', array("policy_id" => $policy_id), 'id', $tmp_user["id"]); } else { // We create a new record - $insert_data = "(`sys_userid`, `sys_groupid`, `sys_perm_user`, `sys_perm_group`, `sys_perm_other`, `server_id`, `priority`, `policy_id`, `email`, `fullname`, `local`) - VALUES (".$app->functions->intval($domain["sys_userid"]).", ".$app->functions->intval($domain["sys_groupid"]).", 'riud', 'riud', '', ".$app->functions->intval($domain["server_id"]).", 10, ".$app->functions->intval($policy_id).", '".$app->db->quote($rec["email"])."', '".$app->db->quote($rec["email"])."', 'Y')"; + $insert_data = array( + "sys_userid" => $domain["sys_userid"], + "sys_groupid" => $domain["sys_groupid"], + "sys_perm_user" => 'riud', + "sys_perm_group" => 'riud', + "sys_perm_other" => '', + "server_id" => $domain["server_id"], + "priority" => 10, + "policy_id" => $policy_id, + "email" => $rec["email"], + "fullname" => $rec["email"], + "local" => 'Y' + ); $app->db->datalogInsert('spamfilter_users', $insert_data, 'id'); } }else { -- Gitblit v1.9.1