| @@ 1312-1326 (lines=15) @@ | ||
| 1309 | * @param int $operation 1 = add, 2 = modify, 3 = delete. |
|
| 1310 | * @return void |
|
| 1311 | */ |
|
| 1312 | protected function addChange($calendarId, $objectUri, $operation) { |
|
| 1313 | ||
| 1314 | $stmt = $this->db->prepare('INSERT INTO `*PREFIX*calendarchanges` (`uri`, `synctoken`, `calendarid`, `operation`) SELECT ?, `synctoken`, ?, ? FROM `*PREFIX*calendars` WHERE `id` = ?'); |
|
| 1315 | $stmt->execute([ |
|
| 1316 | $objectUri, |
|
| 1317 | $calendarId, |
|
| 1318 | $operation, |
|
| 1319 | $calendarId |
|
| 1320 | ]); |
|
| 1321 | $stmt = $this->db->prepare('UPDATE `*PREFIX*calendars` SET `synctoken` = `synctoken` + 1 WHERE `id` = ?'); |
|
| 1322 | $stmt->execute([ |
|
| 1323 | $calendarId |
|
| 1324 | ]); |
|
| 1325 | ||
| 1326 | } |
|
| 1327 | ||
| 1328 | /** |
|
| 1329 | * Parses some information from calendar objects, used for optimized |
|
| @@ 759-772 (lines=14) @@ | ||
| 756 | * @param int $operation 1 = add, 2 = modify, 3 = delete |
|
| 757 | * @return void |
|
| 758 | */ |
|
| 759 | protected function addChange($addressBookId, $objectUri, $operation) { |
|
| 760 | $sql = 'INSERT INTO `*PREFIX*addressbookchanges`(`uri`, `synctoken`, `addressbookid`, `operation`) SELECT ?, `synctoken`, ?, ? FROM `*PREFIX*addressbooks` WHERE `id` = ?'; |
|
| 761 | $stmt = $this->db->prepare($sql); |
|
| 762 | $stmt->execute([ |
|
| 763 | $objectUri, |
|
| 764 | $addressBookId, |
|
| 765 | $operation, |
|
| 766 | $addressBookId |
|
| 767 | ]); |
|
| 768 | $stmt = $this->db->prepare('UPDATE `*PREFIX*addressbooks` SET `synctoken` = `synctoken` + 1 WHERE `id` = ?'); |
|
| 769 | $stmt->execute([ |
|
| 770 | $addressBookId |
|
| 771 | ]); |
|
| 772 | } |
|
| 773 | ||
| 774 | private function readBlob($cardData) { |
|
| 775 | if (is_resource($cardData)) { |
|