mirror of
https://github.com/nerzhul/ocsms.git
synced 2025-06-07 16:06:15 +00:00
fix a missing brace and change id to _id
This commit is contained in:
parent
79f3b5ca24
commit
53cc14fc52
@ -58,7 +58,7 @@ class SmsController extends Controller {
|
|||||||
}
|
}
|
||||||
|
|
||||||
foreach ($smsDatas as &$sms) {
|
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("date", $sms) || !array_key_exists("seen", $sms) ||
|
||||||
!array_key_exists("body", $sms) || !array_key_exists("address", $sms)) {
|
!array_key_exists("body", $sms) || !array_key_exists("address", $sms)) {
|
||||||
$this->errorMsg = "Error: bad SMS entry";
|
$this->errorMsg = "Error: bad SMS entry";
|
||||||
|
@ -35,7 +35,7 @@ class SmsMapper extends Mapper {
|
|||||||
'(?,?,?,?,?,?,?,?)');
|
'(?,?,?,?,?,?,?,?)');
|
||||||
$result = $query->execute(array(
|
$result = $query->execute(array(
|
||||||
$userId, "NOW()", "NOW()", $smsFlags,
|
$userId, "NOW()", "NOW()", $smsFlags,
|
||||||
(int) $sms["date"], (int) $sms["id"],
|
(int) $sms["date"], (int) $sms["_id"],
|
||||||
$sms["address"], $sms["body"]
|
$sms["address"], $sms["body"]
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user