| @@ 1115-1128 (lines=14) @@ | ||
| 1112 | return $principalUri; |
|
| 1113 | } |
|
| 1114 | ||
| 1115 | private function addOwnerPrincipal(&$addressbookInfo) { |
|
| 1116 | $ownerPrincipalKey = '{' . \OCA\DAV\DAV\Sharing\Plugin::NS_OWNCLOUD . '}owner-principal'; |
|
| 1117 | $displaynameKey = '{' . \OCA\DAV\DAV\Sharing\Plugin::NS_NEXTCLOUD . '}owner-displayname'; |
|
| 1118 | if (isset($addressbookInfo[$ownerPrincipalKey])) { |
|
| 1119 | $uri = $addressbookInfo[$ownerPrincipalKey]; |
|
| 1120 | } else { |
|
| 1121 | $uri = $addressbookInfo['principaluri']; |
|
| 1122 | } |
|
| 1123 | ||
| 1124 | $principalInformation = $this->principalBackend->getPrincipalByPath($uri); |
|
| 1125 | if (isset($principalInformation['{DAV:}displayname'])) { |
|
| 1126 | $addressbookInfo[$displaynameKey] = $principalInformation['{DAV:}displayname']; |
|
| 1127 | } |
|
| 1128 | } |
|
| 1129 | } |
|
| 1130 | ||
| @@ 2362-2375 (lines=14) @@ | ||
| 2359 | return $principalUri; |
|
| 2360 | } |
|
| 2361 | ||
| 2362 | private function addOwnerPrincipal(&$calendarInfo) { |
|
| 2363 | $ownerPrincipalKey = '{' . \OCA\DAV\DAV\Sharing\Plugin::NS_OWNCLOUD . '}owner-principal'; |
|
| 2364 | $displaynameKey = '{' . \OCA\DAV\DAV\Sharing\Plugin::NS_NEXTCLOUD . '}owner-displayname'; |
|
| 2365 | if (isset($calendarInfo[$ownerPrincipalKey])) { |
|
| 2366 | $uri = $calendarInfo[$ownerPrincipalKey]; |
|
| 2367 | } else { |
|
| 2368 | $uri = $calendarInfo['principaluri']; |
|
| 2369 | } |
|
| 2370 | ||
| 2371 | $principalInformation = $this->principalBackend->getPrincipalByPath($uri); |
|
| 2372 | if (isset($principalInformation['{DAV:}displayname'])) { |
|
| 2373 | $calendarInfo[$displaynameKey] = $principalInformation['{DAV:}displayname']; |
|
| 2374 | } |
|
| 2375 | } |
|
| 2376 | } |
|
| 2377 | ||