mirror of
https://github.com/nextcloud/ocsms.git
synced 2026-08-21 21:32:59 +00:00
add missing return for getAllIds and prevent duplicate IDs
This commit is contained in:
+5
-1
@@ -31,8 +31,12 @@ class SmsMapper extends Mapper {
|
|||||||
if (!isset($smsList[$mbox])) {
|
if (!isset($smsList[$mbox])) {
|
||||||
$smsList[$mbox] = array();
|
$smsList[$mbox] = array();
|
||||||
}
|
}
|
||||||
array_push($smsList[$mbox], $row["sms_id"]);
|
|
||||||
|
if (!in_array($row["sms_id"], $smsList[$mbox])) {
|
||||||
|
array_push($smsList[$mbox], $row["sms_id"]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
return $smsList;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function writeToDB ($userId, $smsList, $purgeAllSmsBeforeInsert = false) {
|
public function writeToDB ($userId, $smsList, $purgeAllSmsBeforeInsert = false) {
|
||||||
|
|||||||
Reference in New Issue
Block a user