| @@ 2105-2118 (lines=14) @@ | ||
| 2102 | return $principalUri; |
|
| 2103 | } |
|
| 2104 | ||
| 2105 | private function addOwnerPrincipal(&$calendarInfo) { |
|
| 2106 | $ownerPrincipalKey = '{' . \OCA\DAV\DAV\Sharing\Plugin::NS_OWNCLOUD . '}owner-principal'; |
|
| 2107 | $displaynameKey = '{' . \OCA\DAV\DAV\Sharing\Plugin::NS_NEXTCLOUD . '}owner-displayname'; |
|
| 2108 | if (isset($calendarInfo[$ownerPrincipalKey])) { |
|
| 2109 | $uri = $calendarInfo[$ownerPrincipalKey]; |
|
| 2110 | } else { |
|
| 2111 | $uri = $calendarInfo['principaluri']; |
|
| 2112 | } |
|
| 2113 | ||
| 2114 | $principalInformation = $this->principalBackend->getPrincipalByPath($uri); |
|
| 2115 | if (isset($principalInformation['{DAV:}displayname'])) { |
|
| 2116 | $calendarInfo[$displaynameKey] = $principalInformation['{DAV:}displayname']; |
|
| 2117 | } |
|
| 2118 | } |
|
| 2119 | } |
|
| 2120 | ||
| @@ 1103-1116 (lines=14) @@ | ||
| 1100 | return $principalUri; |
|
| 1101 | } |
|
| 1102 | ||
| 1103 | private function addOwnerPrincipal(&$addressbookInfo) { |
|
| 1104 | $ownerPrincipalKey = '{' . \OCA\DAV\DAV\Sharing\Plugin::NS_OWNCLOUD . '}owner-principal'; |
|
| 1105 | $displaynameKey = '{' . \OCA\DAV\DAV\Sharing\Plugin::NS_NEXTCLOUD . '}owner-displayname'; |
|
| 1106 | if (isset($addressbookInfo[$ownerPrincipalKey])) { |
|
| 1107 | $uri = $addressbookInfo[$ownerPrincipalKey]; |
|
| 1108 | } else { |
|
| 1109 | $uri = $addressbookInfo['principaluri']; |
|
| 1110 | } |
|
| 1111 | ||
| 1112 | $principalInformation = $this->principalBackend->getPrincipalByPath($uri); |
|
| 1113 | if (isset($principalInformation['{DAV:}displayname'])) { |
|
| 1114 | $addressbookInfo[$displaynameKey] = $principalInformation['{DAV:}displayname']; |
|
| 1115 | } |
|
| 1116 | } |
|
| 1117 | } |
|
| 1118 | ||