1
0
mirror of https://github.com/nerzhul/ocsms.git synced 2025-06-07 07:56:23 +00:00

fix a missing brace and change id to _id

This commit is contained in:
Loïc Blot (@U-Exp) 2014-09-12 19:11:12 +02:00
parent 79f3b5ca24
commit 53cc14fc52
2 changed files with 2 additions and 2 deletions

View File

@ -58,7 +58,7 @@ class SmsController extends Controller {
}
foreach ($smsDatas as &$sms) {
if (!array_key_exists("id", $sms) || !array_key_exists("read", $sms) ||
if (!array_key_exists("_id", $sms) || !array_key_exists("read", $sms) ||
!array_key_exists("date", $sms) || !array_key_exists("seen", $sms) ||
!array_key_exists("body", $sms) || !array_key_exists("address", $sms)) {
$this->errorMsg = "Error: bad SMS entry";

View File

@ -35,7 +35,7 @@ class SmsMapper extends Mapper {
'(?,?,?,?,?,?,?,?)');
$result = $query->execute(array(
$userId, "NOW()", "NOW()", $smsFlags,
(int) $sms["date"], (int) $sms["id"],
(int) $sms["date"], (int) $sms["_id"],
$sms["address"], $sms["body"]
));
}