1
0
mirror of https://github.com/nextcloud/ocsms.git synced 2026-08-11 16:32:55 +00:00

Use DB transaction methods of the DB connection (#225)

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
This commit is contained in:
Morris Jobke
2018-03-21 12:17:22 +01:00
committed by Loïc Blot
parent 005f761d9e
commit c33d871bf0
2 changed files with 8 additions and 8 deletions
+2 -2
View File
@@ -52,7 +52,7 @@ class ConversationStateMapper extends Mapper {
}
public function setLast ($userId, $phoneNumber, $lastDate) {
\OCP\DB::beginTransaction();
$this->db->beginTransaction();
$query = \OCP\DB::prepare('DELETE FROM *PREFIX*ocsms_conversation_read_states ' .
'WHERE user_id = ? AND phone_number = ?');
$query->execute(array($userId, $phoneNumber));
@@ -61,7 +61,7 @@ class ConversationStateMapper extends Mapper {
'(user_id, phone_number, int_date) VALUES ' .
'(?,?,?)');
$query->execute(array($userId, $phoneNumber, $lastDate));
\OCP\DB::commit();
$this->db->commit();
}
/*