From a79b8b0ef1829a5817566574e55954cd2e8a9610 Mon Sep 17 00:00:00 2001 From: Michiel Dethmers Date: Mon, 2 Nov 2015 14:03:09 +0000 Subject: [PATCH] add messagesCount and use embargo in update call, not internal sendstart --- plugins/restapi/includes/messages.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/plugins/restapi/includes/messages.php b/plugins/restapi/includes/messages.php index 994312e..36bfa9c 100644 --- a/plugins/restapi/includes/messages.php +++ b/plugins/restapi/includes/messages.php @@ -17,6 +17,12 @@ public static function messageGet($id = 0) } Common::select('Message', 'SELECT * FROM '.$GLOBALS['table_prefix'].'message WHERE id='.$id.';', true); } + + public static function messagesCount() + { + Common::select('Messages', 'SELECT count(id) as total FROM '.$GLOBALS['table_prefix'].'message',true); + } + public static function messagesGet() { @@ -113,7 +119,7 @@ public static function messageUpdate($id = 0) $stmt->bindParam('status', $_REQUEST['status']); $stmt->bindParam('sendformat', $_REQUEST['sendformat']); $stmt->bindParam('template', $_REQUEST['template']); - $stmt->bindParam('sendstart', $_REQUEST['sendstart']); + $stmt->bindParam('embargo', $_REQUEST['embargo']); $stmt->bindParam('rsstemplate', $_REQUEST['rsstemplate']); $stmt->bindParam('owner', $_REQUEST['owner']); $stmt->bindParam('htmlformatted', $_REQUEST['htmlformatted']);