| @@ 143-151 (lines=9) @@ | ||
| 140 | $group = $this->groupManager->get($share->getSharedWith()); |
|
| 141 | $result['share_with'] = $share->getSharedWith(); |
|
| 142 | $result['share_with_displayname'] = $group !== null ? $group->getDisplayName() : $share->getSharedWith(); |
|
| 143 | } else if ($share->getShareType() === \OCP\Share::SHARE_TYPE_ROOM) { |
|
| 144 | $result['share_with'] = $share->getSharedWith(); |
|
| 145 | $result['share_with_displayname'] = ''; |
|
| 146 | ||
| 147 | try { |
|
| 148 | $result = array_merge($result, $this->getRoomShareHelper()->formatShare($share)); |
|
| 149 | } catch (QueryException $e) { |
|
| 150 | } |
|
| 151 | } |
|
| 152 | ||
| 153 | return $result; |
|
| 154 | ||
| @@ 243-251 (lines=9) @@ | ||
| 240 | $shareWithStart = ($hasCircleId? strrpos($share->getSharedWith(), '[') + 1: 0); |
|
| 241 | $shareWithLength = ($hasCircleId? -1: strpos($share->getSharedWith(), ' ')); |
|
| 242 | $result['share_with'] = substr($share->getSharedWith(), $shareWithStart, $shareWithLength); |
|
| 243 | } else if ($share->getShareType() === Share::SHARE_TYPE_ROOM) { |
|
| 244 | $result['share_with'] = $share->getSharedWith(); |
|
| 245 | $result['share_with_displayname'] = ''; |
|
| 246 | ||
| 247 | try { |
|
| 248 | $result = array_merge($result, $this->getRoomShareHelper()->formatShare($share)); |
|
| 249 | } catch (QueryException $e) { |
|
| 250 | } |
|
| 251 | } |
|
| 252 | ||
| 253 | ||
| 254 | $result['mail_send'] = $share->getMailSend() ? 1 : 0; |
|