Files
xamxam/TODO.md

3.2 KiB

TODO

TFE Public Page — File Display

  • Replace <embed> with <iframe> for PDF display (better cross-browser support)
  • Exclude cover file_type from public files loop (covers are banners, not content)
  • Move App::boot() in Dispatcher to after direct-response matching (no session on media requests)

SMTP Relay — bad greeting fix

  • Fix $read() loop: use !== false so empty lines don't terminate early; check timed_out meta
  • Add SSL stream context (verify_peer=false) to stream_socket_client to avoid CA bundle failures
  • Improve "bad greeting" error: distinguish timeout vs garbage response in log message

Bug Fixes

  • Fix RateLimit::check() called statically in request-access.php — replaced with (new RateLimit(3, 600))->checkKey($rateLimitKey)

Dev / Debug Fixes

  • Fix serve recipe: show all PHP output (errors, logs) except static assets/connection noise
  • Fix STORAGE_ROOT — use local app/storage/ in dev (cli-server), /var/www/posterg/storage in prod
  • Create app/storage/covers/ and app/storage/theses/ with .gitkeep
  • Add gitignore rules for uploaded files in dev storage dirs
  • Fix error_log path in formulaire.php (was relative, now absolute)
  • Fix CSRF debug: log both tokens on mismatch
  • Fix undefined $redirect on success path in formulaire.php

Deploy — Preserve Remote Data

  • Exclude storage/posterg.db from rsync (not sent locally, not deleted remotely)
  • Exclude storage/theses/ from rsync (not sent locally, not deleted remotely)
  • Exclude storage/covers/ from rsync (not sent locally, not deleted remotely)

Deploy — Rename deploy path to /var/www/xamxam

  • Update rsync destination in justfile (deploy, deploy-db recipes)
  • Update all /var/www/posterg paths in scripts/deploy-server.sh
  • Update root directive in nginx/posterg.conf
  • Update STORAGE_ROOT production path in app/bootstrap.php

File Display in Forms & Recaps

  • Add live file preview to file-field.php partial (data-preview attribute + .file-preview-list container)
  • Write file-preview.js — renders thumbnails for images, emoji icons for PDFs/videos/zips, filename + size
  • Load file-preview.js in admin/add.php via $extraJs
  • Load file-preview.js in admin/edit.php via $extraJs
  • Load file-preview.js in partage/index.php (self-contained HTML, direct <script> tag)
  • Support $extraJs in head.php
  • Add data-preview + preview container to edit template's cover/banner/files inputs (not using partial)
  • Enhance admin/recapitulatif.php template — image thumbnails, clickable filenames, type badges, file size, date
  • Rewrite partage/recapitulatif.php — full recap with thesis metadata + uploaded files list (thumbnails for images, icons for others)
  • Add CSS: .file-preview-list, .fp-item, .fp-thumb, .fp-icon, .fp-meta, .fp-name, .fp-size
  • Add CSS: .recap-file-list, .recap-file-item, .recap-file-thumb, .recap-file-icon, .recap-file-meta, .recap-file-type-badge, .recap-file-date
  • Add CSS: .partage-recap, .recap-section, .recap-dl for partage recap layout