|
|
|
@ -417,7 +417,7 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription |
|
|
|
|
|
|
|
|
|
[, $name] = Uri\split($row['principaluri']); |
|
|
|
|
$uri = $row['uri'] . '_shared_by_' . $name; |
|
|
|
|
$row['displayname'] = $row['displayname'] . ' (' . $this->getUserDisplayName($name) . ')'; |
|
|
|
|
$row['displayname'] = $row['displayname'] . ' (' . ($this->userManager->getDisplayName($name) ?? ($name ?? '')) . ')'; |
|
|
|
|
$components = []; |
|
|
|
|
if ($row['components']) { |
|
|
|
|
$components = explode(',',$row['components']); |
|
|
|
@ -493,25 +493,6 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription |
|
|
|
|
return array_values($calendars); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* @param $uid |
|
|
|
|
* @return string |
|
|
|
|
*/ |
|
|
|
|
private function getUserDisplayName($uid) { |
|
|
|
|
if (!isset($this->userDisplayNames[$uid])) { |
|
|
|
|
$user = $this->userManager->get($uid); |
|
|
|
|
|
|
|
|
|
if ($user instanceof IUser) { |
|
|
|
|
$this->userDisplayNames[$uid] = $user->getDisplayName(); |
|
|
|
|
} else { |
|
|
|
|
$this->userDisplayNames[$uid] = $uid; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
return $this->userDisplayNames[$uid]; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* @return array |
|
|
|
|
*/ |
|
|
|
|