Rename author_email→contact_interne, author_show_contact→contact_public across view/controllers/templates

- v_theses_full: author_email→contact_interne, author_show_contact→contact_public
- Updated schema.sql and live DB view
- Renamed all PHP variables: currentAuthorEmail→contactInterne, currentAuthorShowContact→contactPublic
- Restored contact_interne backoffice field with proper wiring (takes precedence over mail field)
- Updated admin/add.php, admin/edit.php, partage/index.php, public/tfe.php templates
This commit is contained in:
Pontoporeia
2026-05-10 03:02:53 +02:00
parent 8a4b2541fb
commit fa30aab368
10 changed files with 55 additions and 21 deletions

View File

@@ -323,7 +323,12 @@ class ThesisCreateController
throw new Exception("Le champ 'Nom/Prénom/Pseudo' est requis.");
}
$mail = !empty($post['mail']) ? $this->sanitiseString($post['mail']) : '';
// contact_interne (backoffice) takes precedence over mail (tfe-info fieldset)
$contactInterne = trim($post['contact_interne'] ?? '');
$mail = !empty($post['mail']) ? $this->sanitiseString($post['mail']) : '';
if ($contactInterne !== '') {
$mail = $contactInterne;
}
// contact_public: respected if present (admin form); defaults to true for student forms
// where the spec says contact is always visible when provided.
if (array_key_exists('contact_public', $post)) {