| @@ 850-863 (lines=14) @@ | ||
| 847 | * @param int $operation 1 = add, 2 = modify, 3 = delete |
|
| 848 | * @return void |
|
| 849 | */ |
|
| 850 | protected function addChange($addressBookId, $objectUri, $operation) { |
|
| 851 | $sql = 'INSERT INTO `*PREFIX*addressbookchanges`(`uri`, `synctoken`, `addressbookid`, `operation`) SELECT ?, `synctoken`, ?, ? FROM `*PREFIX*addressbooks` WHERE `id` = ?'; |
|
| 852 | $stmt = $this->db->prepare($sql); |
|
| 853 | $stmt->execute([ |
|
| 854 | $objectUri, |
|
| 855 | $addressBookId, |
|
| 856 | $operation, |
|
| 857 | $addressBookId |
|
| 858 | ]); |
|
| 859 | $stmt = $this->db->prepare('UPDATE `*PREFIX*addressbooks` SET `synctoken` = `synctoken` + 1 WHERE `id` = ?'); |
|
| 860 | $stmt->execute([ |
|
| 861 | $addressBookId |
|
| 862 | ]); |
|
| 863 | } |
|
| 864 | ||
| 865 | private function readBlob($cardData) { |
|
| 866 | if (is_resource($cardData)) { |
|
| @@ 1807-1821 (lines=15) @@ | ||
| 1804 | * @param int $operation 1 = add, 2 = modify, 3 = delete. |
|
| 1805 | * @return void |
|
| 1806 | */ |
|
| 1807 | protected function addChange($calendarId, $objectUri, $operation) { |
|
| 1808 | ||
| 1809 | $stmt = $this->db->prepare('INSERT INTO `*PREFIX*calendarchanges` (`uri`, `synctoken`, `calendarid`, `operation`) SELECT ?, `synctoken`, ?, ? FROM `*PREFIX*calendars` WHERE `id` = ?'); |
|
| 1810 | $stmt->execute([ |
|
| 1811 | $objectUri, |
|
| 1812 | $calendarId, |
|
| 1813 | $operation, |
|
| 1814 | $calendarId |
|
| 1815 | ]); |
|
| 1816 | $stmt = $this->db->prepare('UPDATE `*PREFIX*calendars` SET `synctoken` = `synctoken` + 1 WHERE `id` = ?'); |
|
| 1817 | $stmt->execute([ |
|
| 1818 | $calendarId |
|
| 1819 | ]); |
|
| 1820 | ||
| 1821 | } |
|
| 1822 | ||
| 1823 | /** |
|
| 1824 | * Parses some information from calendar objects, used for optimized |
|