From 43e41ea4716c341aad3c983ddd0c4860100f7184 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Rapha=C3=ABl=20Gertz?= Date: Thu, 1 Feb 2024 04:41:07 +0100 Subject: [PATCH] Restore update check Store description in plain text --- Command/CalendarCommand.php | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/Command/CalendarCommand.php b/Command/CalendarCommand.php index 25c45ca..34b1005 100644 --- a/Command/CalendarCommand.php +++ b/Command/CalendarCommand.php @@ -289,38 +289,37 @@ class CalendarCommand extends Command { ]; //Init description - #$description = '
Description
'.$markdown->convert(strip_tags(str_replace(["\r", "\n\n"], ['', "\n"], $session['p_description']))).'
'; - $description = '
Description
'.$markdown->convert(strip_tags($session['p_description'])).'
'; + $description = 'Description :'."\n".strip_tags(preg_replace('!([^<]+)!', '\1', $markdown->convert(strip_tags($session['p_description'])))); + $shared['description'] = $markdown->convert(strip_tags($session['p_description'])); //Add class when available if (!empty($session['p_class'])) { $shared['class'] = $session['p_class']; - #$description .= '
Classe
'.$markdown->convert(strip_tags(str_replace(["\r", "\n\n"], ['', "\n"], $session['p_class']))).'
'; - $description .= '
Classe

'.$session['p_class'].'

'; + $description .= "\n\n".'Classe :'."\n".$session['p_class']; } //Add contact when available if (!empty($session['p_contact'])) { $shared['contact'] = $session['p_contact']; - $description .= '
Contacter

'.$session['p_contact'].'

'; + $description .= "\n\n".'Contact :'."\n".$session['p_contact']; } //Add donate when available if (!empty($session['p_donate'])) { $shared['donate'] = $session['p_donate']; - $description .= '
Contribuer

'.$session['p_donate'].'

'; + $description .= "\n\n".'Contribuer :'."\n".$session['p_donate']; } //Add link when available if (!empty($session['p_link'])) { $shared['link'] = $session['p_link']; - $description .= '
Site

'.$session['p_link'].'

'; + $description .= "\n\n".'Site :'."\n".$session['p_link']; } //Add profile when available if (!empty($session['p_profile'])) { $shared['profile'] = $session['p_profile']; - $description .= '
Réseau social

'.$session['p_profile'].'

'; + $description .= "\n\n".'Réseau social :'."\n".$session['p_profile']; } //Locked session @@ -388,8 +387,7 @@ class CalendarCommand extends Command { $event = $events[$sessionId]; //With updated event - #if ($session['updated'] >= (new \DateTime($event->getUpdated()))) { - { + if ($session['updated'] >= (new \DateTime($event->getUpdated()))) { //Set summary $event->setSummary($session['au_pseudonym'].' '.$this->translator->trans('at '.$session['l_short'])); -- 2.41.1