| @@ 71-76 (lines=6) @@ | ||
| 68 | * @param string[] $remove |
|
| 69 | */ |
|
| 70 | public function updateShares(IShareable $shareable, array $add, array $remove) { |
|
| 71 | foreach($add as $element) { |
|
| 72 | $principal = $this->principalBackend->findByUri($element['href'], ''); |
|
| 73 | if ($principal !== '') { |
|
| 74 | $this->shareWith($shareable, $element); |
|
| 75 | } |
|
| 76 | } |
|
| 77 | foreach($remove as $element) { |
|
| 78 | $principal = $this->principalBackend->findByUri($element, ''); |
|
| 79 | if ($principal !== '') { |
|
| @@ 77-82 (lines=6) @@ | ||
| 74 | $this->shareWith($shareable, $element); |
|
| 75 | } |
|
| 76 | } |
|
| 77 | foreach($remove as $element) { |
|
| 78 | $principal = $this->principalBackend->findByUri($element, ''); |
|
| 79 | if ($principal !== '') { |
|
| 80 | $this->unshare($shareable, $element); |
|
| 81 | } |
|
| 82 | } |
|
| 83 | } |
|
| 84 | ||
| 85 | /** |
|