| @@ 195-205 (lines=11) @@ | ||
| 192 | } |
|
| 193 | ||
| 194 | $readOnly = (int) $row['access'] === Backend::ACCESS_READ; |
|
| 195 | if (isset($addressBooks[$row['id']])) { |
|
| 196 | if ($readOnly) { |
|
| 197 | // New share can not have more permissions then the old one. |
|
| 198 | continue; |
|
| 199 | } |
|
| 200 | if (isset($addressBooks[$row['id']][$readOnlyPropertyName]) && |
|
| 201 | $addressBooks[$row['id']][$readOnlyPropertyName] === 0) { |
|
| 202 | // Old share is already read-write, no more permissions can be gained |
|
| 203 | continue; |
|
| 204 | } |
|
| 205 | } |
|
| 206 | ||
| 207 | list(, $name) = \Sabre\Uri\split($row['principaluri']); |
|
| 208 | $uri = $row['uri'] . '_shared_by_' . $name; |
|
| @@ 321-331 (lines=11) @@ | ||
| 318 | } |
|
| 319 | ||
| 320 | $readOnly = (int) $row['access'] === Backend::ACCESS_READ; |
|
| 321 | if (isset($calendars[$row['id']])) { |
|
| 322 | if ($readOnly) { |
|
| 323 | // New share can not have more permissions then the old one. |
|
| 324 | continue; |
|
| 325 | } |
|
| 326 | if (isset($calendars[$row['id']][$readOnlyPropertyName]) && |
|
| 327 | $calendars[$row['id']][$readOnlyPropertyName] === 0) { |
|
| 328 | // Old share is already read-write, no more permissions can be gained |
|
| 329 | continue; |
|
| 330 | } |
|
| 331 | } |
|
| 332 | ||
| 333 | list(, $name) = Uri\split($row['principaluri']); |
|
| 334 | $uri = $row['uri'] . '_shared_by_' . $name; |
|