From 5c6d64eb1468758bd2c85470eda9565d8d9c4ebd Mon Sep 17 00:00:00 2001 From: julesduroux Date: Sat, 3 Oct 2026 17:25:57 +0200 Subject: [PATCH 1/5] remone (FR) and (EN) from the title, put the newsletter number at the end --- includes/listmonk.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/includes/listmonk.php b/includes/listmonk.php index d2c32553..57b8f6b2 100644 --- a/includes/listmonk.php +++ b/includes/listmonk.php @@ -129,7 +129,7 @@ function listmonkSubscribe(string $email, string $name, string $lang, array $att * campaigns:get_all / campaigns:manage_all permissions. * * Campaigns are found by their tags (news- and the language), not by name. - * The name carries the newsletter number, "Newsletter #N (FR) – title": N counts + * The name ends with the newsletter number, "title – Newsletter #N": N counts * the news whose e-mail was sent (running, paused or finished campaign), so the * many drafts never sent do not raise it, and both languages of one news share * it. A draft takes the next number; a news already sent in one language keeps @@ -164,7 +164,8 @@ function listmonkSaveNewsCampaign(int $newsId, string $lang, string $title, int if (in_array($c['status'] ?? '', $sent, true)) { foreach ($tags as $t) { if (strpos($t, 'news-') === 0) { - $sentNews[$t] = preg_match('/^Newsletter #(\d+)/', $c['name'] ?? '', $m) ? (int)$m[1] : 0; + // Last "Newsletter #N" of the name (a title may contain one too). + $sentNews[$t] = preg_match('/.*Newsletter #(\d+)/s', $c['name'] ?? '', $m) ? (int)$m[1] : 0; } } } @@ -175,7 +176,7 @@ function listmonkSaveNewsCampaign(int $newsId, string $lang, string $title, int $number = !empty($sentNews[$tag]) ? $sentNews[$tag] : count(array_diff_key($sentNews, [$tag => 0])) + 1; $payload = [ - 'name' => 'Newsletter #' . $number . ' (' . strtoupper($lang) . ') – ' . $title, + 'name' => $title . ' – Newsletter #' . $number, 'subject' => $title, 'lists' => [$listId], 'type' => 'regular', From 494e66ad41f5cea1e38b515f6aa6fd2b5c42ea00 Mon Sep 17 00:00:00 2001 From: Alexandre Wavelet Date: Wed, 21 Oct 2026 21:45:00 +0200 Subject: [PATCH 2/5] Fix the PHP 8.4 deprecations and reserved function names str_getcsv() must receive its escape argument explicitly in PHP 8.4, rss.php could pass a NULL slug to rawurlencode() (deprecated since 8.1), and the azure theme used the __ prefix PHP reserves for itself. All changes run unchanged on PHP 7.4, which preprod keeps until its own runtime switch. Co-Authored-By: Claude Opus 5.5 --- pages/rss.php | 2 +- .../src/Domain/DeckParser.php | 2 +- .../src/Infrastructure/CurlDeckApiClient.php | 4 ++-- themes/azure/nav.php | 24 +++++++++---------- 4 files changed, 16 insertions(+), 16 deletions(-) diff --git a/pages/rss.php b/pages/rss.php index 6e24d8a5..a8b99ce0 100644 --- a/pages/rss.php +++ b/pages/rss.php @@ -61,7 +61,7 @@ : $plain; } - $link = $siteUrl . '/pages/news-detail?slug=' . rawurlencode($news['slug']); + $link = $siteUrl . '/pages/news-detail?slug=' . rawurlencode((string) ($news['slug'] ?? '')); $pubDate = !empty($news['published_at']) ? date('r', strtotime($news['published_at'])) : date('r', strtotime($news['created_at'])); diff --git a/plugins/equinox-deck-import/src/Domain/DeckParser.php b/plugins/equinox-deck-import/src/Domain/DeckParser.php index 777b5142..b8cc80a7 100644 --- a/plugins/equinox-deck-import/src/Domain/DeckParser.php +++ b/plugins/equinox-deck-import/src/Domain/DeckParser.php @@ -44,7 +44,7 @@ private function accumulateDecks(string $raw): array continue; } - $cols = str_getcsv($line, ';', '"'); + $cols = str_getcsv($line, ';', '"', '\\'); if (count($cols) < 8) { continue; } diff --git a/plugins/equinox-deck-import/src/Infrastructure/CurlDeckApiClient.php b/plugins/equinox-deck-import/src/Infrastructure/CurlDeckApiClient.php index 53e47238..d979c0d6 100644 --- a/plugins/equinox-deck-import/src/Infrastructure/CurlDeckApiClient.php +++ b/plugins/equinox-deck-import/src/Infrastructure/CurlDeckApiClient.php @@ -101,7 +101,7 @@ private function request(string $method, string $path, ?string $payload = null): /** * @param string[] $ids - * @return array + * @return array */ private function openHandles($multi, array $ids): array { @@ -138,7 +138,7 @@ private function runMulti($multi): void } /** - * @param array $handles + * @param array $handles * @param array $errors * @return array */ diff --git a/themes/azure/nav.php b/themes/azure/nav.php index 5dd8d377..54b7de35 100644 --- a/themes/azure/nav.php +++ b/themes/azure/nav.php @@ -5,16 +5,16 @@ // $_langNames, $_langUrls, $_hTxt, $__mobileCompact $__iframeNavId = ($currentPage === 'iframe') ? (int)($_GET['nav'] ?? 0) : 0; -if (!function_exists('__nav_href')) { - function __nav_href(array $item): string { +if (!function_exists('acNavHref')) { + function acNavHref(array $item): string { if (!empty($item['is_iframe'])) { return BASE_URL . '/pages/iframe?nav=' . (int)$item['id']; } return BASE_URL . resolveUrlLang($item['url']); } } -if (!function_exists('__nav_active')) { - function __nav_active(array $item, string $currentPage, int $iframeNavId): bool { +if (!function_exists('acNavActive')) { + function acNavActive(array $item, string $currentPage, int $iframeNavId): bool { if (!empty($item['is_separator']) || !empty($item['is_section_header'])) return false; if (!empty($item['is_iframe'])) return $iframeNavId === (int)$item['id']; $__parsed = parse_url($item['url'] ?? ''); @@ -73,10 +73,10 @@ function __nav_active(array $item, string $currentPage, int $iframeNavId): bool
- > @@ -150,7 +150,7 @@ class="nav-link"