| @@ 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 | ||
| @@ 2309-2322 (lines=14) @@ | ||
| 2306 | return $principalUri; |
|
| 2307 | } |
|
| 2308 | ||
| 2309 | private function addOwnerPrincipal(&$calendarInfo) { |
|
| 2310 | $ownerPrincipalKey = '{' . \OCA\DAV\DAV\Sharing\Plugin::NS_OWNCLOUD . '}owner-principal'; |
|
| 2311 | $displaynameKey = '{' . \OCA\DAV\DAV\Sharing\Plugin::NS_NEXTCLOUD . '}owner-displayname'; |
|
| 2312 | if (isset($calendarInfo[$ownerPrincipalKey])) { |
|
| 2313 | $uri = $calendarInfo[$ownerPrincipalKey]; |
|
| 2314 | } else { |
|
| 2315 | $uri = $calendarInfo['principaluri']; |
|
| 2316 | } |
|
| 2317 | ||
| 2318 | $principalInformation = $this->principalBackend->getPrincipalByPath($uri); |
|
| 2319 | if (isset($principalInformation['{DAV:}displayname'])) { |
|
| 2320 | $calendarInfo[$displaynameKey] = $principalInformation['{DAV:}displayname']; |
|
| 2321 | } |
|
| 2322 | } |
|
| 2323 | } |
|
| 2324 | ||