| @@ 1293-1307 (lines=15) @@ | ||
| 1290 | * @param int $operation 1 = add, 2 = modify, 3 = delete. |
|
| 1291 | * @return void |
|
| 1292 | */ |
|
| 1293 | protected function addChange($calendarId, $objectUri, $operation) { |
|
| 1294 | ||
| 1295 | $stmt = $this->db->prepare('INSERT INTO `*PREFIX*calendarchanges` (`uri`, `synctoken`, `calendarid`, `operation`) SELECT ?, `synctoken`, ?, ? FROM `*PREFIX*calendars` WHERE `id` = ?'); |
|
| 1296 | $stmt->execute([ |
|
| 1297 | $objectUri, |
|
| 1298 | $calendarId, |
|
| 1299 | $operation, |
|
| 1300 | $calendarId |
|
| 1301 | ]); |
|
| 1302 | $stmt = $this->db->prepare('UPDATE `*PREFIX*calendars` SET `synctoken` = `synctoken` + 1 WHERE `id` = ?'); |
|
| 1303 | $stmt->execute([ |
|
| 1304 | $calendarId |
|
| 1305 | ]); |
|
| 1306 | ||
| 1307 | } |
|
| 1308 | ||
| 1309 | /** |
|
| 1310 | * Parses some information from calendar objects, used for optimized |
|
| @@ 739-752 (lines=14) @@ | ||
| 736 | * @param int $operation 1 = add, 2 = modify, 3 = delete |
|
| 737 | * @return void |
|
| 738 | */ |
|
| 739 | protected function addChange($addressBookId, $objectUri, $operation) { |
|
| 740 | $sql = 'INSERT INTO `*PREFIX*addressbookchanges`(`uri`, `synctoken`, `addressbookid`, `operation`) SELECT ?, `synctoken`, ?, ? FROM `*PREFIX*addressbooks` WHERE `id` = ?'; |
|
| 741 | $stmt = $this->db->prepare($sql); |
|
| 742 | $stmt->execute([ |
|
| 743 | $objectUri, |
|
| 744 | $addressBookId, |
|
| 745 | $operation, |
|
| 746 | $addressBookId |
|
| 747 | ]); |
|
| 748 | $stmt = $this->db->prepare('UPDATE `*PREFIX*addressbooks` SET `synctoken` = `synctoken` + 1 WHERE `id` = ?'); |
|
| 749 | $stmt->execute([ |
|
| 750 | $addressBookId |
|
| 751 | ]); |
|
| 752 | } |
|
| 753 | ||
| 754 | private function readBlob($cardData) { |
|
| 755 | if (is_resource($cardData)) { |
|