From 971e4ed6de0eb10d5152a042f5dd34f4a995d544 Mon Sep 17 00:00:00 2001 From: paolo Date: Tue, 21 Jun 2016 15:21:51 +0200 Subject: [PATCH] Fixed controller message parameters validation --- application/controllers/api/v1/system/Message.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/application/controllers/api/v1/system/Message.php b/application/controllers/api/v1/system/Message.php index 7cfbc7737..a0f7d469f 100644 --- a/application/controllers/api/v1/system/Message.php +++ b/application/controllers/api/v1/system/Message.php @@ -58,8 +58,8 @@ class Message extends APIv1_Controller $this->post()['person_id'], $this->post()['subject'], $this->post()['body'], - $this->post()['priority'], - $this->post()['relationmessage_id'], + PRIORITY_NORMAL, + NULL, $this->post()['oe_kurzbz'] ); @@ -73,7 +73,8 @@ class Message extends APIv1_Controller private function _validate($message = null) { - if (!isset($message['person_id']) || !isset($message['subject']) || !isset($message['body'])) + if (!isset($message['person_id']) || !isset($message['subject']) || + !isset($message['body']) || !isset($message['oe_kurzbz'])) { return false; }