migrate apropos data from config/apropos.php to SQLite

- Create apropos_contents table via migration 010
- Add Database methods: getAproposContent(), saveAproposContent(), getAllAproposContents()
- Replace admin/pages.php with admin/contenus.php (renamed header from 'Pages statiques' to 'Contenus')
- Replace admin/pages-edit.php with admin/contenus-edit.php (support editing pages + apropos contents)
- Create admin/actions/apropos.php for saving apropos data (contacts, credits, erg_url)
- Update public/apropos.php to read contacts/credits/erg_url from DB
- Delete config/apropos.php
This commit is contained in:
Pontoporeia
2026-04-16 13:44:06 +02:00
parent 4158c72d08
commit bf30aab0b3
15 changed files with 538 additions and 236 deletions

19
TODO.md
View File

@@ -1,9 +1,14 @@
# TODO
## Completed
- [x] Fix share link slug regex mismatch (base64 chars vs base32 pattern)
- [x] Fix regex delimiter clash (`/` inside `[...]` broke the pattern) → switched to `#` delimiter
- [x] Add PHP dev server router for /partage/<slug> URL rewriting
- [x] Add nginx location block for /partage/ pretty URLs
- [x] Fix POST path missing App::boot() (session not started before submission handler)
- [x] Fix rate limiter: was instantiating RateLimit then ignoring it, reimplementing inline; added checkKey() to RateLimit and use it
- [x] Create migration 010_apropos_contents.sql (apropos_contents table, seed defaults)
- [x] Add apropos CRUD methods to Database.php
- [x] Create admin/contenus.php (replaces pages.php)
- [x] Create admin/contenus-edit.php (edit pages + apropos contacts/credits/erg_url)
- [x] Create admin/actions/apropos.php - save handler for apropos contents
- [x] Update templates/header.php: rename "Pages statiques" → "Contenus", update nav links
- [x] Update public/apropos.php: read contacts/credits/erg_url from DB instead of config
- [x] Delete config/apropos.php
- [x] Delete public/admin/pages.php
- [x] Delete public/admin/pages-edit.php
- [x] Delete public/admin/actions/page.php
- [x] Update storage/schema.sql with apropos_contents table + trigger