| @@ 730-743 (lines=14) @@ | ||
| 727 | * @param int $operation 1 = add, 2 = modify, 3 = delete |
|
| 728 | * @return void |
|
| 729 | */ |
|
| 730 | protected function addChange($addressBookId, $objectUri, $operation) { |
|
| 731 | $sql = 'INSERT INTO `*PREFIX*addressbookchanges`(`uri`, `synctoken`, `addressbookid`, `operation`) SELECT ?, `synctoken`, ?, ? FROM `*PREFIX*addressbooks` WHERE `id` = ?'; |
|
| 732 | $stmt = $this->db->prepare($sql); |
|
| 733 | $stmt->execute([ |
|
| 734 | $objectUri, |
|
| 735 | $addressBookId, |
|
| 736 | $operation, |
|
| 737 | $addressBookId |
|
| 738 | ]); |
|
| 739 | $stmt = $this->db->prepare('UPDATE `*PREFIX*addressbooks` SET `synctoken` = `synctoken` + 1 WHERE `id` = ?'); |
|
| 740 | $stmt->execute([ |
|
| 741 | $addressBookId |
|
| 742 | ]); |
|
| 743 | } |
|
| 744 | ||
| 745 | private function readBlob($cardData) { |
|
| 746 | if (is_resource($cardData)) { |
|
| @@ 1408-1422 (lines=15) @@ | ||
| 1405 | * @param int $operation 1 = add, 2 = modify, 3 = delete. |
|
| 1406 | * @return void |
|
| 1407 | */ |
|
| 1408 | protected function addChange($calendarId, $objectUri, $operation) { |
|
| 1409 | ||
| 1410 | $stmt = $this->db->prepare('INSERT INTO `*PREFIX*calendarchanges` (`uri`, `synctoken`, `calendarid`, `operation`) SELECT ?, `synctoken`, ?, ? FROM `*PREFIX*calendars` WHERE `id` = ?'); |
|
| 1411 | $stmt->execute([ |
|
| 1412 | $objectUri, |
|
| 1413 | $calendarId, |
|
| 1414 | $operation, |
|
| 1415 | $calendarId |
|
| 1416 | ]); |
|
| 1417 | $stmt = $this->db->prepare('UPDATE `*PREFIX*calendars` SET `synctoken` = `synctoken` + 1 WHERE `id` = ?'); |
|
| 1418 | $stmt->execute([ |
|
| 1419 | $calendarId |
|
| 1420 | ]); |
|
| 1421 | ||
| 1422 | } |
|
| 1423 | ||
| 1424 | /** |
|
| 1425 | * Parses some information from calendar objects, used for optimized |
|