From eb4613593255a00e55fb5fc52f4d3b9d7a29da79 Mon Sep 17 00:00:00 2001 From: SJ Date: Mon, 12 Dec 2016 21:34:58 +0100 Subject: [PATCH] policy fixes Change-Id: Id160ae7af95afef4d25530d8a52d03861b30cebb Signed-off-by: SJ --- webui/model/policy/archiving.php | 2 +- webui/model/policy/retention.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/webui/model/policy/archiving.php b/webui/model/policy/archiving.php index 2081f0ec..7bf2a0dd 100644 --- a/webui/model/policy/archiving.php +++ b/webui/model/policy/archiving.php @@ -26,7 +26,7 @@ class ModelPolicyArchiving extends Model { public function add_new_rule($data = array()) { - $query = $this->db->query("INSERT INTO " . TABLE_ARCHIVING_RULE . " (`from`,`to`,`subject`,`body`,`_size`,`size`,`attachment_name`,`attachment_type`,`_attachment_size`,`attachment_size`,`spam`) VALUES(?,?,?,?,?,?,?,?,?,?,?)", array($data['from'], $data['to'], $data['subject'], $data['body'], $data['_size'], $data['size'], $data['attachment_name'], $data['attachment_type'], $data['_attachment_size'], $data['attachment_size'], $data['spam'])); + $query = $this->db->query("INSERT INTO " . TABLE_ARCHIVING_RULE . " (`from`,`to`,`subject`,`body`,`_size`,`size`,`attachment_name`,`attachment_type`,`_attachment_size`,`attachment_size`,`spam`) VALUES(?,?,?,?,?,?,?,?,?,?,?)", array($data['from'], $data['to'], $data['subject'], $data['body'], $data['_size'], (int)$data['size'], $data['attachment_name'], $data['attachment_type'], $data['_attachment_size'], (int)$data['attachment_size'], $data['spam'])); return $this->db->countAffected(); } diff --git a/webui/model/policy/retention.php b/webui/model/policy/retention.php index 7ff99b32..b8a68d4e 100644 --- a/webui/model/policy/retention.php +++ b/webui/model/policy/retention.php @@ -30,7 +30,7 @@ class ModelPolicyRetention extends Model { if(isset($data['domain'])) { $domain = $data['domain']; } - $query = $this->db->query("INSERT INTO " . TABLE_RETENTION_RULE . " (`domain`,`from`,`to`,`subject`,`body`,`_size`,`size`,`attachment_name`,`attachment_type`,`_attachment_size`,`attachment_size`,`spam`,`days`) VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?)", array($domain, $data['from'], $data['to'], $data['subject'], $data['body'], $data['_size'], $data['size'], $data['attachment_name'], $data['attachment_type'], $data['_attachment_size'], $data['attachment_size'], $data['spam'], $data['days']) ); + $query = $this->db->query("INSERT INTO " . TABLE_RETENTION_RULE . " (`domain`,`from`,`to`,`subject`,`body`,`_size`,`size`,`attachment_name`,`attachment_type`,`_attachment_size`,`attachment_size`,`spam`,`days`) VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?)", array($domain, $data['from'], $data['to'], $data['subject'], $data['body'], $data['_size'], (int)$data['size'], $data['attachment_name'], $data['attachment_type'], $data['_attachment_size'], (int)$data['attachment_size'], $data['spam'], (int)$data['days']) ); return $this->db->countAffected(); }