| @@ 842-855 (lines=14) @@ | ||
| 839 | * @param int $operation 1 = add, 2 = modify, 3 = delete |
|
| 840 | * @return void |
|
| 841 | */ |
|
| 842 | protected function addChange($addressBookId, $objectUri, $operation) { |
|
| 843 | $sql = 'INSERT INTO `*PREFIX*addressbookchanges`(`uri`, `synctoken`, `addressbookid`, `operation`) SELECT ?, `synctoken`, ?, ? FROM `*PREFIX*addressbooks` WHERE `id` = ?'; |
|
| 844 | $stmt = $this->db->prepare($sql); |
|
| 845 | $stmt->execute([ |
|
| 846 | $objectUri, |
|
| 847 | $addressBookId, |
|
| 848 | $operation, |
|
| 849 | $addressBookId |
|
| 850 | ]); |
|
| 851 | $stmt = $this->db->prepare('UPDATE `*PREFIX*addressbooks` SET `synctoken` = `synctoken` + 1 WHERE `id` = ?'); |
|
| 852 | $stmt->execute([ |
|
| 853 | $addressBookId |
|
| 854 | ]); |
|
| 855 | } |
|
| 856 | ||
| 857 | private function readBlob($cardData) { |
|
| 858 | if (is_resource($cardData)) { |
|
| @@ 1774-1788 (lines=15) @@ | ||
| 1771 | * @param int $operation 1 = add, 2 = modify, 3 = delete. |
|
| 1772 | * @return void |
|
| 1773 | */ |
|
| 1774 | protected function addChange($calendarId, $objectUri, $operation) { |
|
| 1775 | ||
| 1776 | $stmt = $this->db->prepare('INSERT INTO `*PREFIX*calendarchanges` (`uri`, `synctoken`, `calendarid`, `operation`) SELECT ?, `synctoken`, ?, ? FROM `*PREFIX*calendars` WHERE `id` = ?'); |
|
| 1777 | $stmt->execute([ |
|
| 1778 | $objectUri, |
|
| 1779 | $calendarId, |
|
| 1780 | $operation, |
|
| 1781 | $calendarId |
|
| 1782 | ]); |
|
| 1783 | $stmt = $this->db->prepare('UPDATE `*PREFIX*calendars` SET `synctoken` = `synctoken` + 1 WHERE `id` = ?'); |
|
| 1784 | $stmt->execute([ |
|
| 1785 | $calendarId |
|
| 1786 | ]); |
|
| 1787 | ||
| 1788 | } |
|
| 1789 | ||
| 1790 | /** |
|
| 1791 | * Parses some information from calendar objects, used for optimized |
|