| @@ 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 | ||
| @@ 2138-2151 (lines=14) @@ | ||
| 2135 | return $principalUri; |
|
| 2136 | } |
|
| 2137 | ||
| 2138 | private function addOwnerPrincipal(&$calendarInfo) { |
|
| 2139 | $ownerPrincipalKey = '{' . \OCA\DAV\DAV\Sharing\Plugin::NS_OWNCLOUD . '}owner-principal'; |
|
| 2140 | $displaynameKey = '{' . \OCA\DAV\DAV\Sharing\Plugin::NS_NEXTCLOUD . '}owner-displayname'; |
|
| 2141 | if (isset($calendarInfo[$ownerPrincipalKey])) { |
|
| 2142 | $uri = $calendarInfo[$ownerPrincipalKey]; |
|
| 2143 | } else { |
|
| 2144 | $uri = $calendarInfo['principaluri']; |
|
| 2145 | } |
|
| 2146 | ||
| 2147 | $principalInformation = $this->principalBackend->getPrincipalByPath($uri); |
|
| 2148 | if (isset($principalInformation['{DAV:}displayname'])) { |
|
| 2149 | $calendarInfo[$displaynameKey] = $principalInformation['{DAV:}displayname']; |
|
| 2150 | } |
|
| 2151 | } |
|
| 2152 | } |
|
| 2153 | ||