From 4c3f71b6e4c740b982330979df33ea27ac95841f Mon Sep 17 00:00:00 2001 From: Pontoporeia Date: Sat, 4 Apr 2026 12:05:24 +0200 Subject: [PATCH] Extract apropos contacts/credits to config/apropos.php MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Names, roles, emails, and credits on the À propos page were hardcoded directly in apropos.php HTML. To update a contact meant editing a template file — risky for non-developers and easy to introduce a typo or broken mailto link. Changes: - config/apropos.php: new config array with erg_url, contacts[] (name, role, email per person) and credits[] (label/value pairs); follows the same pattern as config/admin_credentials.php - public/apropos.php: loads config via require; aside section now loops over $apropos['contacts'] and $apropos['credits'] with htmlspecialchars throughout; hardcoded HTML strings removed entirely Also audited todo/02-php-components.md and marked 8 stale items as done: all 5 form field partials were already implemented and in use, the flash-message consolidation was already handled by App::consumeFlash(), and the RateLimit cache dir was already at storage/cache/rate_limit (excluded from deploy rsync). --- TODO.md | 4 +++ config/apropos.php | 53 +++++++++++++++++++++++++++++++++++++++ public/apropos.php | 37 ++++++++++++--------------- todo/02-php-components.md | 16 ++++++------ 4 files changed, 81 insertions(+), 29 deletions(-) create mode 100644 config/apropos.php diff --git a/TODO.md b/TODO.md index 14b3b93..6e47ecb 100644 --- a/TODO.md +++ b/TODO.md @@ -11,6 +11,10 @@ Pending tasks have been split into topic files under [`todo/`](todo/README.md): ## Recently completed (this session) +- [x] `config/apropos.php` — extracted hardcoded contacts (Laurent Leprince, Xavier Gorgol, Brigitte Ledune) and credits into a config array (`contacts[]`, `credits[]`, `erg_url`); `public/apropos.php` now loops over the config with `htmlspecialchars` instead of embedding names/emails in HTML +- [x] `todo/02-php-components.md` — audited and marked 8 stale items as already done: all 5 form field partials (`text-field`, `select-field`, `checkbox-list`, `file-field`, `jury-fieldset`), `admin-alert.php`/`flash-messages.php` consolidation, `RateLimit` cache dir placement, and `apropos.php` contacts extraction + + - [x] WCAG 4.1.2 `