| @@ 1482-1496 (lines=15) @@ | ||
| 1479 | * @param int $operation 1 = add, 2 = modify, 3 = delete. |
|
| 1480 | * @return void |
|
| 1481 | */ |
|
| 1482 | protected function addChange($calendarId, $objectUri, $operation) { |
|
| 1483 | ||
| 1484 | $stmt = $this->db->prepare('INSERT INTO `*PREFIX*calendarchanges` (`uri`, `synctoken`, `calendarid`, `operation`) SELECT ?, `synctoken`, ?, ? FROM `*PREFIX*calendars` WHERE `id` = ?'); |
|
| 1485 | $stmt->execute([ |
|
| 1486 | $objectUri, |
|
| 1487 | $calendarId, |
|
| 1488 | $operation, |
|
| 1489 | $calendarId |
|
| 1490 | ]); |
|
| 1491 | $stmt = $this->db->prepare('UPDATE `*PREFIX*calendars` SET `synctoken` = `synctoken` + 1 WHERE `id` = ?'); |
|
| 1492 | $stmt->execute([ |
|
| 1493 | $calendarId |
|
| 1494 | ]); |
|
| 1495 | ||
| 1496 | } |
|
| 1497 | ||
| 1498 | /** |
|
| 1499 | * Parses some information from calendar objects, used for optimized |
|
| @@ 763-776 (lines=14) @@ | ||
| 760 | * @param int $operation 1 = add, 2 = modify, 3 = delete |
|
| 761 | * @return void |
|
| 762 | */ |
|
| 763 | protected function addChange($addressBookId, $objectUri, $operation) { |
|
| 764 | $sql = 'INSERT INTO `*PREFIX*addressbookchanges`(`uri`, `synctoken`, `addressbookid`, `operation`) SELECT ?, `synctoken`, ?, ? FROM `*PREFIX*addressbooks` WHERE `id` = ?'; |
|
| 765 | $stmt = $this->db->prepare($sql); |
|
| 766 | $stmt->execute([ |
|
| 767 | $objectUri, |
|
| 768 | $addressBookId, |
|
| 769 | $operation, |
|
| 770 | $addressBookId |
|
| 771 | ]); |
|
| 772 | $stmt = $this->db->prepare('UPDATE `*PREFIX*addressbooks` SET `synctoken` = `synctoken` + 1 WHERE `id` = ?'); |
|
| 773 | $stmt->execute([ |
|
| 774 | $addressBookId |
|
| 775 | ]); |
|
| 776 | } |
|
| 777 | ||
| 778 | private function readBlob($cardData) { |
|
| 779 | if (is_resource($cardData)) { |
|