| @@ 1834-1847 (lines=14) @@ | ||
| 1831 | return $principalUri; |
|
| 1832 | } |
|
| 1833 | ||
| 1834 | private function addOwnerPrincipal(&$calendarInfo) { |
|
| 1835 | $ownerPrincipalKey = '{' . \OCA\DAV\DAV\Sharing\Plugin::NS_OWNCLOUD . '}owner-principal'; |
|
| 1836 | $displaynameKey = '{' . \OCA\DAV\DAV\Sharing\Plugin::NS_NEXTCLOUD . '}owner-displayname'; |
|
| 1837 | if (isset($calendarInfo[$ownerPrincipalKey])) { |
|
| 1838 | $uri = $calendarInfo[$ownerPrincipalKey]; |
|
| 1839 | } else { |
|
| 1840 | $uri = $calendarInfo['principaluri']; |
|
| 1841 | } |
|
| 1842 | ||
| 1843 | $principalInformation = $this->principalBackend->getPrincipalByPath($uri); |
|
| 1844 | if (isset($principalInformation['{DAV:}displayname'])) { |
|
| 1845 | $calendarInfo[$displaynameKey] = $principalInformation['{DAV:}displayname']; |
|
| 1846 | } |
|
| 1847 | } |
|
| 1848 | } |
|
| 1849 | ||
| @@ 1104-1117 (lines=14) @@ | ||
| 1101 | return $principalUri; |
|
| 1102 | } |
|
| 1103 | ||
| 1104 | private function addOwnerPrincipal(&$addressbookInfo) { |
|
| 1105 | $ownerPrincipalKey = '{' . \OCA\DAV\DAV\Sharing\Plugin::NS_OWNCLOUD . '}owner-principal'; |
|
| 1106 | $displaynameKey = '{' . \OCA\DAV\DAV\Sharing\Plugin::NS_NEXTCLOUD . '}owner-displayname'; |
|
| 1107 | if (isset($addressbookInfo[$ownerPrincipalKey])) { |
|
| 1108 | $uri = $addressbookInfo[$ownerPrincipalKey]; |
|
| 1109 | } else { |
|
| 1110 | $uri = $addressbookInfo['principaluri']; |
|
| 1111 | } |
|
| 1112 | ||
| 1113 | $principalInformation = $this->principalBackend->getPrincipalByPath($uri); |
|
| 1114 | if (isset($principalInformation['{DAV:}displayname'])) { |
|
| 1115 | $addressbookInfo[$displaynameKey] = $principalInformation['{DAV:}displayname']; |
|
| 1116 | } |
|
| 1117 | } |
|
| 1118 | } |
|
| 1119 | ||