| @@ 1596-1610 (lines=15) @@ | ||
| 1593 | * @param int $operation 1 = add, 2 = modify, 3 = delete. |
|
| 1594 | * @return void |
|
| 1595 | */ |
|
| 1596 | protected function addChange($calendarId, $objectUri, $operation) { |
|
| 1597 | ||
| 1598 | $stmt = $this->db->prepare('INSERT INTO `*PREFIX*calendarchanges` (`uri`, `synctoken`, `calendarid`, `operation`) SELECT ?, `synctoken`, ?, ? FROM `*PREFIX*calendars` WHERE `id` = ?'); |
|
| 1599 | $stmt->execute([ |
|
| 1600 | $objectUri, |
|
| 1601 | $calendarId, |
|
| 1602 | $operation, |
|
| 1603 | $calendarId |
|
| 1604 | ]); |
|
| 1605 | $stmt = $this->db->prepare('UPDATE `*PREFIX*calendars` SET `synctoken` = `synctoken` + 1 WHERE `id` = ?'); |
|
| 1606 | $stmt->execute([ |
|
| 1607 | $calendarId |
|
| 1608 | ]); |
|
| 1609 | ||
| 1610 | } |
|
| 1611 | ||
| 1612 | /** |
|
| 1613 | * Parses some information from calendar objects, used for optimized |
|
| @@ 812-825 (lines=14) @@ | ||
| 809 | * @param int $operation 1 = add, 2 = modify, 3 = delete |
|
| 810 | * @return void |
|
| 811 | */ |
|
| 812 | protected function addChange($addressBookId, $objectUri, $operation) { |
|
| 813 | $sql = 'INSERT INTO `*PREFIX*addressbookchanges`(`uri`, `synctoken`, `addressbookid`, `operation`) SELECT ?, `synctoken`, ?, ? FROM `*PREFIX*addressbooks` WHERE `id` = ?'; |
|
| 814 | $stmt = $this->db->prepare($sql); |
|
| 815 | $stmt->execute([ |
|
| 816 | $objectUri, |
|
| 817 | $addressBookId, |
|
| 818 | $operation, |
|
| 819 | $addressBookId |
|
| 820 | ]); |
|
| 821 | $stmt = $this->db->prepare('UPDATE `*PREFIX*addressbooks` SET `synctoken` = `synctoken` + 1 WHERE `id` = ?'); |
|
| 822 | $stmt->execute([ |
|
| 823 | $addressBookId |
|
| 824 | ]); |
|
| 825 | } |
|
| 826 | ||
| 827 | private function readBlob($cardData) { |
|
| 828 | if (is_resource($cardData)) { |
|