mirror of
https://codeberg.org/PostERG/xamxam.git
synced 2026-08-10 23:31:21 +02:00
Add SQLite indexes for contenus page language/tag queries + WIP: Peertube orphans, dialogs, contact decoupling, context note, finality types
This commit is contained in:
@@ -274,6 +274,9 @@ class ExportController
|
||||
'Licence',
|
||||
'Points sur 20',
|
||||
'Lien BAIU',
|
||||
'CC2r',
|
||||
'Exemplaire BAIU',
|
||||
'Exemplaire ERG',
|
||||
];
|
||||
|
||||
/**
|
||||
@@ -390,6 +393,9 @@ class ExportController
|
||||
$t['license_name'] ?? '',
|
||||
isset($t['jury_points']) ? (string) $t['jury_points'] : '',
|
||||
$t['baiu_link'] ?? '',
|
||||
!empty($t['cc2r']) ? 'Oui' : 'Non',
|
||||
!empty($t['exemplaire_baiu']) ? 'Oui' : 'Non',
|
||||
!empty($t['exemplaire_erg']) ? 'Oui' : 'Non',
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
@@ -339,8 +339,13 @@ class ThesisCreateController
|
||||
if ($contactVisible === '') {
|
||||
$contactVisible = trim($post['mail'] ?? '');
|
||||
}
|
||||
// showContact: whether to show the contact publicly
|
||||
if (array_key_exists('contact_public', $post)) {
|
||||
// showContact: whether to show the contact publicly on the TFE page.
|
||||
// In admin mode, the checkbox always renders — unchecked = not sent.
|
||||
// In student mode (partage), the checkbox is not shown, so we
|
||||
// default to true when contact_visible is filled.
|
||||
if ($adminMode) {
|
||||
$showContact = !empty($post['contact_public']);
|
||||
} elseif (array_key_exists('contact_public', $post)) {
|
||||
$showContact = !empty($post['contact_public']);
|
||||
} else {
|
||||
$showContact = $contactVisible !== '';
|
||||
|
||||
@@ -249,6 +249,8 @@ class ThesisEditController
|
||||
// contact_interne = private email of the first author (backoffice field)
|
||||
$contactInterne = trim($post['contact_interne'] ?? '');
|
||||
$firstAuthorEmail = $contactInterne !== '' ? $contactInterne : null;
|
||||
// contact_public: whether to show the public contact on the TFE page
|
||||
$showContact = !empty($post['contact_public']);
|
||||
$authorNames = [];
|
||||
if ($authorsRaw !== '') {
|
||||
$authorNames = array_values(array_filter(array_map('trim', explode(',', $authorsRaw)), fn ($n) => $n !== ''));
|
||||
@@ -259,7 +261,7 @@ class ThesisEditController
|
||||
$authorEntries[] = [
|
||||
'name' => $name,
|
||||
'email' => $i === 0 ? $firstAuthorEmail : null,
|
||||
'show_contact' => $i === 0,
|
||||
'show_contact' => $i === 0 && $showContact,
|
||||
];
|
||||
}
|
||||
$this->db->setThesisAuthors($thesisId, $authorEntries);
|
||||
|
||||
Reference in New Issue
Block a user