diff options
author | Anna Larch <anna@nextcloud.com> | 2023-04-07 00:28:42 +0200 |
---|---|---|
committer | Anna Larch <anna@nextcloud.com> | 2023-04-07 00:28:42 +0200 |
commit | 1811a0e8f9675d8bdd145e2a63f4844de9696ba5 (patch) | |
tree | d5758d61f46ecb96647149e5f07cf23c071d8590 /apps/dav | |
parent | f61bcd8b5f49a7b85576849469d3a73b14d0ecd7 (diff) | |
download | nextcloud-server-1811a0e8f9675d8bdd145e2a63f4844de9696ba5.tar.gz nextcloud-server-1811a0e8f9675d8bdd145e2a63f4844de9696ba5.zip |
fix(dav): add string comparison for diff
Signed-off-by: Anna Larch <anna@nextcloud.com>
Diffstat (limited to 'apps/dav')
-rw-r--r-- | apps/dav/lib/CalDAV/Schedule/IMipService.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/apps/dav/lib/CalDAV/Schedule/IMipService.php b/apps/dav/lib/CalDAV/Schedule/IMipService.php index 3a624bca4bc..034a59a98d4 100644 --- a/apps/dav/lib/CalDAV/Schedule/IMipService.php +++ b/apps/dav/lib/CalDAV/Schedule/IMipService.php @@ -98,7 +98,7 @@ class IMipService { return $default; } $newstring = $vevent->$property->getValue(); - if(isset($oldVEvent->$property)) { + if(isset($oldVEvent->$property) && $oldVEvent->$property->getValue() !== $newstring ) { $oldstring = $oldVEvent->$property->getValue(); return sprintf($strikethrough, $oldstring, $newstring); } @@ -128,7 +128,7 @@ class IMipService { $data['meeting_location_html'] = $this->generateDiffString($vEvent, $oldVEvent, 'LOCATION', $data['meeting_location']); $oldUrl = self::readPropertyWithDefault($oldVEvent, 'URL', $defaultVal); - $data['meeting_url_html'] = !empty($oldUrl) ? sprintf('<a href="%1$s">%1$s</a>', $oldUrl) : $data['meeting_url']; + $data['meeting_url_html'] = !empty($oldUrl) && $oldUrl !== $data['meeting_url'] ? sprintf('<a href="%1$s">%1$s</a>', $oldUrl) : $data['meeting_url']; $data['meeting_when_html'] = ($oldMeetingWhen !== $data['meeting_when'] && $oldMeetingWhen !== null) @@ -477,7 +477,7 @@ class IMipService { */ public function addBulletList(IEMailTemplate $template, VEvent $vevent, $data) { $template->addBodyListItem( - $data['meeting_title'], $this->l10n->t('Title:'), + $data['meeting_title_html'] ?? $data['meeting_title'], $this->l10n->t('Title:'), $this->getAbsoluteImagePath('caldav/title.png'), $data['meeting_title'], '', IMipPlugin::IMIP_INDENT); if ($data['meeting_when'] !== '') { $template->addBodyListItem($data['meeting_when_html'] ?? $data['meeting_when'], $this->l10n->t('Time:'), |