Loading patches/015-email-mail-template.patch +29 −12 Original line number Diff line number Diff line Loading @@ -32,8 +32,8 @@ /** --- ./apps/dav/lib/CalDAV/Schedule/IMipPlugin.php 2022-08-08 17:59:57.632858800 +0530 +++ ./apps/dav/lib/CalDAV/Schedule/IMipPlugin-new.php 2022-08-08 17:21:58.792858800 +0530 --- apps/dav/lib/CalDAV/Schedule/IMipPlugin.php 2022-07-27 13:21:50.294113800 +0530 +++ apps/dav/lib/CalDAV/Schedule/IMipPlugin-New.php 2022-08-16 16:29:16.531866700 +0530 @@ -151,15 +151,6 @@ */ public function schedule(Message $iTipMessage) { Loading Loading @@ -86,7 +86,23 @@ * @param IL10N $l10n * @param VEvent $vevent */ @@ -535,28 +542,85 @@ @@ -525,38 +532,99 @@ private function addSubjectAndHeading(IEMailTemplate $template, IL10N $l10n, $method, $summary) { if ($method === self::METHOD_CANCEL) { - $template->setSubject('Canceled: ' . $summary); + //TRANSLATORS Subject for email, when an invitation is cancelled. Ex: "Cancelled: {{Event Name}}" + $template->setSubject($l10n->t('Cancelled: %1$s', [$summary])); $template->addHeading($l10n->t('Invitation canceled')); } elseif ($method === self::METHOD_REPLY) { - $template->setSubject('Re: ' . $summary); + // TRANSLATORS Subject for email, when an invitation is updated. Ex: "Re: {{Event Name}}" + $template->setSubject($l10n->t('Re: %1$s', [$summary])); $template->addHeading($l10n->t('Invitation updated')); } else { - $template->setSubject('Invitation: ' . $summary); + // TRANSLATORS Subject for email, when an invitation is sent. Ex: "Invitation: {{Event Name}}" + $template->setSubject($l10n->t('Invitation: %1$s', [$summary])); $template->addHeading($l10n->t('Invitation')); } } Loading @@ -100,13 +116,16 @@ + private function addSubjectAndHeadingUpdated(IEMailTemplate $template, IL10N $l10n, + $method, $summary) { + if ($method === self::METHOD_CANCEL) { + $template->setSubject('Canceled: ' . $summary); + //TRANSLATORS Subject for email, when an invitation is cancelled. Ex: "Cancelled: {{Event Name}}" + $template->setSubject($l10n->t('Cancelled: %1$s', [$summary])); + $template->addHeading($l10n->t('Invitation canceled')); + } elseif ($method === self::METHOD_REPLY) { + $template->setSubject('Re: ' . $summary); + // TRANSLATORS Subject for email, when an invitation is updated. Ex: "Re: {{Event Name}}" + $template->setSubject($l10n->t('Re: %1$s', [$summary])); + $template->addHeading($l10n->t('Invitation updated')); + } else { + $template->setSubject('Invitation: ' . $summary); + // TRANSLATORS Subject for email, when an invitation is sent. Ex: "Invitation: {{Event Name}}" + $template->setSubject($l10n->t('Invitation: %1$s', [$summary])); + $template->addHeading($l10n->t('Invitation Update')); + } + } Loading Loading @@ -164,9 +183,7 @@ - if ($vevent->LOCATION) { - $template->addBodyListItem($vevent->LOCATION, $l10n->t('Location:'), - $this->getAbsoluteImagePath('caldav/location.png'),'','',self::IMIP_INDENT); + + if ($selectedEvent->LOCATION) { + + if(trim($selectedEvent->LOCATION)==trim($parentevent->LOCATION)){ + $template->addBodyListItem($selectedEvent->LOCATION, $l10n->t('Location:'), + $this->getAbsoluteImagePath('caldav/location.png'),'','',self::IMIP_INDENT); Loading @@ -184,7 +201,7 @@ $template->addBodyListItem(sprintf('<a href="%s">%s</a>', htmlspecialchars($url), htmlspecialchars($url)), @@ -565,12 +629,18 @@ @@ -565,12 +633,18 @@ $url,'',self::IMIP_INDENT); } Loading @@ -207,7 +224,7 @@ } } @@ -671,7 +741,6 @@ @@ -671,7 +745,6 @@ $l10n->t('Maybe'), $this->urlGenerator->getAbsoluteUrl('apps/calendar/invitation/tentative/'.$token) ); Loading @@ -215,7 +232,7 @@ } /** @@ -716,4 +785,4 @@ @@ -716,4 +789,4 @@ return $token; } Loading Loading
patches/015-email-mail-template.patch +29 −12 Original line number Diff line number Diff line Loading @@ -32,8 +32,8 @@ /** --- ./apps/dav/lib/CalDAV/Schedule/IMipPlugin.php 2022-08-08 17:59:57.632858800 +0530 +++ ./apps/dav/lib/CalDAV/Schedule/IMipPlugin-new.php 2022-08-08 17:21:58.792858800 +0530 --- apps/dav/lib/CalDAV/Schedule/IMipPlugin.php 2022-07-27 13:21:50.294113800 +0530 +++ apps/dav/lib/CalDAV/Schedule/IMipPlugin-New.php 2022-08-16 16:29:16.531866700 +0530 @@ -151,15 +151,6 @@ */ public function schedule(Message $iTipMessage) { Loading Loading @@ -86,7 +86,23 @@ * @param IL10N $l10n * @param VEvent $vevent */ @@ -535,28 +542,85 @@ @@ -525,38 +532,99 @@ private function addSubjectAndHeading(IEMailTemplate $template, IL10N $l10n, $method, $summary) { if ($method === self::METHOD_CANCEL) { - $template->setSubject('Canceled: ' . $summary); + //TRANSLATORS Subject for email, when an invitation is cancelled. Ex: "Cancelled: {{Event Name}}" + $template->setSubject($l10n->t('Cancelled: %1$s', [$summary])); $template->addHeading($l10n->t('Invitation canceled')); } elseif ($method === self::METHOD_REPLY) { - $template->setSubject('Re: ' . $summary); + // TRANSLATORS Subject for email, when an invitation is updated. Ex: "Re: {{Event Name}}" + $template->setSubject($l10n->t('Re: %1$s', [$summary])); $template->addHeading($l10n->t('Invitation updated')); } else { - $template->setSubject('Invitation: ' . $summary); + // TRANSLATORS Subject for email, when an invitation is sent. Ex: "Invitation: {{Event Name}}" + $template->setSubject($l10n->t('Invitation: %1$s', [$summary])); $template->addHeading($l10n->t('Invitation')); } } Loading @@ -100,13 +116,16 @@ + private function addSubjectAndHeadingUpdated(IEMailTemplate $template, IL10N $l10n, + $method, $summary) { + if ($method === self::METHOD_CANCEL) { + $template->setSubject('Canceled: ' . $summary); + //TRANSLATORS Subject for email, when an invitation is cancelled. Ex: "Cancelled: {{Event Name}}" + $template->setSubject($l10n->t('Cancelled: %1$s', [$summary])); + $template->addHeading($l10n->t('Invitation canceled')); + } elseif ($method === self::METHOD_REPLY) { + $template->setSubject('Re: ' . $summary); + // TRANSLATORS Subject for email, when an invitation is updated. Ex: "Re: {{Event Name}}" + $template->setSubject($l10n->t('Re: %1$s', [$summary])); + $template->addHeading($l10n->t('Invitation updated')); + } else { + $template->setSubject('Invitation: ' . $summary); + // TRANSLATORS Subject for email, when an invitation is sent. Ex: "Invitation: {{Event Name}}" + $template->setSubject($l10n->t('Invitation: %1$s', [$summary])); + $template->addHeading($l10n->t('Invitation Update')); + } + } Loading Loading @@ -164,9 +183,7 @@ - if ($vevent->LOCATION) { - $template->addBodyListItem($vevent->LOCATION, $l10n->t('Location:'), - $this->getAbsoluteImagePath('caldav/location.png'),'','',self::IMIP_INDENT); + + if ($selectedEvent->LOCATION) { + + if(trim($selectedEvent->LOCATION)==trim($parentevent->LOCATION)){ + $template->addBodyListItem($selectedEvent->LOCATION, $l10n->t('Location:'), + $this->getAbsoluteImagePath('caldav/location.png'),'','',self::IMIP_INDENT); Loading @@ -184,7 +201,7 @@ $template->addBodyListItem(sprintf('<a href="%s">%s</a>', htmlspecialchars($url), htmlspecialchars($url)), @@ -565,12 +629,18 @@ @@ -565,12 +633,18 @@ $url,'',self::IMIP_INDENT); } Loading @@ -207,7 +224,7 @@ } } @@ -671,7 +741,6 @@ @@ -671,7 +745,6 @@ $l10n->t('Maybe'), $this->urlGenerator->getAbsoluteUrl('apps/calendar/invitation/tentative/'.$token) ); Loading @@ -215,7 +232,7 @@ } /** @@ -716,4 +785,4 @@ @@ -716,4 +789,4 @@ return $token; } Loading