mirror of
https://github.com/nerzhul/ocsms.git
synced 2025-06-11 01:46:13 +00:00
Fix #55 issue. NOW() function doesn't work on all backends
This commit is contained in:
parent
ff3c3e58ef
commit
98933860e8
@ -263,12 +263,13 @@ class SmsMapper extends Mapper {
|
|||||||
$userId, (int) $sms["_id"]
|
$userId, (int) $sms["_id"]
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
$now = date("Y-m-d H:i:s");
|
||||||
$query = \OCP\DB::prepare('INSERT INTO *PREFIX*ocsms_smsdatas ' .
|
$query = \OCP\DB::prepare('INSERT INTO *PREFIX*ocsms_smsdatas ' .
|
||||||
'(user_id, added, lastmodified, sms_flags, sms_date, sms_id,' .
|
'(user_id, added, lastmodified, sms_flags, sms_date, sms_id,' .
|
||||||
'sms_address, sms_msg, sms_mailbox, sms_type) VALUES ' .
|
'sms_address, sms_msg, sms_mailbox, sms_type) VALUES ' .
|
||||||
'(?,?,?,?,?,?,?,?,?,?)');
|
'(?,?,?,?,?,?,?,?,?,?)');
|
||||||
$result = $query->execute(array(
|
$result = $query->execute(array(
|
||||||
$userId, "NOW()", "NOW()", $smsFlags,
|
$userId, $now, $now, $smsFlags,
|
||||||
$sms["date"], (int) $sms["_id"],
|
$sms["date"], (int) $sms["_id"],
|
||||||
$sms["address"], $sms["body"], (int) $sms["mbox"],
|
$sms["address"], $sms["body"], (int) $sms["mbox"],
|
||||||
(int) $sms["type"]
|
(int) $sms["type"]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user