Fix edit form: is_published reset, contact decoupling, note label, author name case

- Fix #1: Add is_published to getThesisRawFields() SELECT so the publish
  checkbox stays checked when editing an already-published TFE.
- Fix #2: Rename 'Note contextuelle' → 'Note contextuelle relative à
  soutenance' in all templates and StudentEmail.
- Fix #3: Update findOrCreateAuthor to also UPDATE the author name when
  a record is found by name (fixes inability to capitalise names).
- Fix #4/#5: Decouple contact_interne (private author email) from
  contact_visible (public contact on TFE page). Add migration 037 to
  add contact_visible TEXT column to theses table and rebuild
  v_theses_full view. Update all controllers, templates, and DB methods
  to treat them independently.
- Fix #6: Investigated libre→interne restriction — no code barrier
  found; likely resolved by is_published fix.
This commit is contained in:
Pontoporeia
2026-06-08 18:31:10 +02:00
parent 3d524226a1
commit 3016c199bd
15 changed files with 164 additions and 37 deletions

View File

@@ -185,16 +185,16 @@
<?php if (!empty($data["context_note"])): ?>
<p class="tfe-meta-item tfe-meta-note">
<span class="tfe-meta-label">Note :</span>
<span class="tfe-meta-label">Note contextuelle relative à soutenance :</span>
<span class="tfe-note-value"><?= nl2br(htmlspecialchars($data["context_note"])) ?></span>
</p>
<?php endif; ?>
<?php if (!empty($data["contact_interne"]) && !empty($data["contact_public"])): ?>
<?php if (!empty($data["contact_visible"])): ?>
<p class="tfe-meta-item">
<span class="tfe-meta-label">Contact :</span>
<?php
$_contact = $data["contact_interne"];
$_contact = $data["contact_visible"];
$_isUrl = filter_var($_contact, FILTER_VALIDATE_URL) !== false;
$_isEmail = !$_isUrl && str_contains($_contact, "@");
if ($_isUrl):