Loading patches/015-email-mail-template.patch +39 −22 Original line number Diff line number Diff line --- apps/dav/lib/CalDAV/Schedule/IMipPlugin.php 2022-09-06 17:56:20.875827300 +0530 +++ apps/dav/lib/CalDAV/Schedule/IMipPlugin-new23.php 2022-09-06 17:13:51.925827300 +0530 --- ./apps/dav/lib/CalDAV/Schedule/IMipPlugin.php 2022-10-26 11:09:37.299156800 +0530 +++ ./apps/dav/lib/CalDAV/Schedule/iMipPluginNew.php 2022-10-26 11:14:48.519156800 +0530 @@ -151,15 +151,6 @@ */ public function schedule(Message $iTipMessage) { Loading Loading @@ -40,7 +40,7 @@ $this->addBulletList($template, $l10n, $vevent); // Only add response buttons to invitation requests: Fix Issue #11230 @@ -542,24 +548,84 @@ @@ -542,24 +548,94 @@ /** * @param IEMailTemplate $template * @param IL10N $l10n Loading Loading @@ -82,7 +82,8 @@ + $lastmodified=$dtstampTime; + $selectedEvent = $currentevent; + } + } } - $meetingWhen = $this->generateWhenString($l10n, $vevent); + + + if ($selectedEvent->SUMMARY) { Loading @@ -94,8 +95,7 @@ + $template->addBodyListItemModified($selectedEvent->SUMMARY, $l10n->t('Updated Title:'), + $this->getAbsoluteImagePath('caldav/title.png'),'','',self::IMIP_INDENT); + } } - $meetingWhen = $this->generateWhenString($l10n, $vevent); + } + $meetingWhen = $this->generateWhenString($l10n, $selectedEvent); if ($meetingWhen) { - $template->addBodyListItem($meetingWhen, $l10n->t('Time:'), Loading @@ -120,13 +120,23 @@ - $this->getAbsoluteImagePath('caldav/location.png'),'','',self::IMIP_INDENT); + if ($selectedEvent->LOCATION) { + if(trim($selectedEvent->LOCATION)==trim($parentevent->LOCATION)){ + if (filter_var(trim($selectedEvent->LOCATION), FILTER_VALIDATE_URL) === FALSE) { + $template->addBodyListItem($selectedEvent->LOCATION, $l10n->t('Location:'), + $this->getAbsoluteImagePath('caldav/location.png'),'','',self::IMIP_INDENT); + }else{ + $template->addBodyListItem($selectedEvent->LOCATION, $l10n->t('Location:'), + $this->getAbsoluteImagePath('caldav/videocall.png'),'','',self::IMIP_INDENT); + } + + }else{ + if (filter_var(trim($selectedEvent->LOCATION), FILTER_VALIDATE_URL) === FALSE) { + $template->addBodyListItemModified($selectedEvent->LOCATION, $l10n->t('Updated Location:'), + $this->getAbsoluteImagePath('caldav/location.png'),'','',self::IMIP_INDENT); + }else{ + $template->addBodyListItemModified($selectedEvent->LOCATION, $l10n->t('Updated Location:'), + $this->getAbsoluteImagePath('caldav/videocall.png'),'','',self::IMIP_INDENT); + } + } + + } - if ($vevent->URL) { Loading @@ -136,7 +146,7 @@ $template->addBodyListItem(sprintf('<a href="%s">%s</a>', htmlspecialchars($url), htmlspecialchars($url)), @@ -568,12 +634,18 @@ @@ -568,12 +644,18 @@ $url,'',self::IMIP_INDENT); } Loading @@ -159,7 +169,7 @@ } } @@ -662,7 +734,7 @@ @@ -662,7 +744,7 @@ Message $iTipMessage, $lastOccurrence) { $token = $this->createInvitationToken($iTipMessage, $lastOccurrence); Loading @@ -168,7 +178,7 @@ $l10n->t('Accept'), $this->urlGenerator->linkToRouteAbsolute('dav.invitation_response.accept', [ 'token' => $token, @@ -670,18 +742,10 @@ @@ -670,18 +752,10 @@ $l10n->t('Decline'), $this->urlGenerator->linkToRouteAbsolute('dav.invitation_response.decline', [ 'token' => $token, Loading @@ -190,3 +200,10 @@ } /** @@ -726,4 +800,4 @@ return $token; } -} \ No newline at end of file +} Loading
patches/015-email-mail-template.patch +39 −22 Original line number Diff line number Diff line --- apps/dav/lib/CalDAV/Schedule/IMipPlugin.php 2022-09-06 17:56:20.875827300 +0530 +++ apps/dav/lib/CalDAV/Schedule/IMipPlugin-new23.php 2022-09-06 17:13:51.925827300 +0530 --- ./apps/dav/lib/CalDAV/Schedule/IMipPlugin.php 2022-10-26 11:09:37.299156800 +0530 +++ ./apps/dav/lib/CalDAV/Schedule/iMipPluginNew.php 2022-10-26 11:14:48.519156800 +0530 @@ -151,15 +151,6 @@ */ public function schedule(Message $iTipMessage) { Loading Loading @@ -40,7 +40,7 @@ $this->addBulletList($template, $l10n, $vevent); // Only add response buttons to invitation requests: Fix Issue #11230 @@ -542,24 +548,84 @@ @@ -542,24 +548,94 @@ /** * @param IEMailTemplate $template * @param IL10N $l10n Loading Loading @@ -82,7 +82,8 @@ + $lastmodified=$dtstampTime; + $selectedEvent = $currentevent; + } + } } - $meetingWhen = $this->generateWhenString($l10n, $vevent); + + + if ($selectedEvent->SUMMARY) { Loading @@ -94,8 +95,7 @@ + $template->addBodyListItemModified($selectedEvent->SUMMARY, $l10n->t('Updated Title:'), + $this->getAbsoluteImagePath('caldav/title.png'),'','',self::IMIP_INDENT); + } } - $meetingWhen = $this->generateWhenString($l10n, $vevent); + } + $meetingWhen = $this->generateWhenString($l10n, $selectedEvent); if ($meetingWhen) { - $template->addBodyListItem($meetingWhen, $l10n->t('Time:'), Loading @@ -120,13 +120,23 @@ - $this->getAbsoluteImagePath('caldav/location.png'),'','',self::IMIP_INDENT); + if ($selectedEvent->LOCATION) { + if(trim($selectedEvent->LOCATION)==trim($parentevent->LOCATION)){ + if (filter_var(trim($selectedEvent->LOCATION), FILTER_VALIDATE_URL) === FALSE) { + $template->addBodyListItem($selectedEvent->LOCATION, $l10n->t('Location:'), + $this->getAbsoluteImagePath('caldav/location.png'),'','',self::IMIP_INDENT); + }else{ + $template->addBodyListItem($selectedEvent->LOCATION, $l10n->t('Location:'), + $this->getAbsoluteImagePath('caldav/videocall.png'),'','',self::IMIP_INDENT); + } + + }else{ + if (filter_var(trim($selectedEvent->LOCATION), FILTER_VALIDATE_URL) === FALSE) { + $template->addBodyListItemModified($selectedEvent->LOCATION, $l10n->t('Updated Location:'), + $this->getAbsoluteImagePath('caldav/location.png'),'','',self::IMIP_INDENT); + }else{ + $template->addBodyListItemModified($selectedEvent->LOCATION, $l10n->t('Updated Location:'), + $this->getAbsoluteImagePath('caldav/videocall.png'),'','',self::IMIP_INDENT); + } + } + + } - if ($vevent->URL) { Loading @@ -136,7 +146,7 @@ $template->addBodyListItem(sprintf('<a href="%s">%s</a>', htmlspecialchars($url), htmlspecialchars($url)), @@ -568,12 +634,18 @@ @@ -568,12 +644,18 @@ $url,'',self::IMIP_INDENT); } Loading @@ -159,7 +169,7 @@ } } @@ -662,7 +734,7 @@ @@ -662,7 +744,7 @@ Message $iTipMessage, $lastOccurrence) { $token = $this->createInvitationToken($iTipMessage, $lastOccurrence); Loading @@ -168,7 +178,7 @@ $l10n->t('Accept'), $this->urlGenerator->linkToRouteAbsolute('dav.invitation_response.accept', [ 'token' => $token, @@ -670,18 +742,10 @@ @@ -670,18 +752,10 @@ $l10n->t('Decline'), $this->urlGenerator->linkToRouteAbsolute('dav.invitation_response.decline', [ 'token' => $token, Loading @@ -190,3 +200,10 @@ } /** @@ -726,4 +800,4 @@ return $token; } -} \ No newline at end of file +}