' .
- '';
+ '';
exit;
}
function hxToastError(string $message): never {
+ $id = 'toast-' . bin2hex(random_bytes(4));
http_response_code(200);
- echo '
' .
+ echo '
' .
'⚠ ' .
htmlspecialchars($message) . '
' .
- '';
+ '';
exit;
}
if ($section === 'formulaire_restrictions') {
// HTMX may not send unchecked checkboxes even with hidden 0-value inputs;
// missing key means unchecked → treat as '0'.
- $newValues = ['restricted_files_enabled' => empty($_POST['restricted_files_enabled']) ? '0' : '1'];
- $db->setSetting('restricted_files_enabled', $newValues['restricted_files_enabled']);
- $logger->logFormSettingsUpdate($newValues);
+ $rawPost = $_POST['restricted_files_enabled'] ?? '(missing)';
+ $newValue = empty($_POST['restricted_files_enabled']) ? '0' : '1';
+ error_log('[settings.php] SAVE formulaire_restrictions | restricted_files_enabled raw=' . var_export($rawPost, true) . ' | resolved=' . $newValue);
+ $db->setSetting('restricted_files_enabled', $newValue);
+ $logger->logFormSettingsUpdate(['restricted_files_enabled' => $newValue]);
if ($isHxRequest) {
hxToastSuccess('Restrictions d\'accès aux fichiers mises à jour.');
} else {
@@ -63,7 +76,9 @@ if ($section === 'formulaire_restrictions') {
];
$newValues = [];
foreach ($allowed as $key) {
+ $raw = $_POST[$key] ?? '(missing)';
$value = empty($_POST[$key]) ? '0' : '1';
+ error_log('[settings.php] SAVE formulaire_acces | ' . $key . ' raw=' . var_export($raw, true) . ' | resolved=' . $value);
$db->setSetting($key, $value);
$newValues[$key] = $value;
}
@@ -74,10 +89,14 @@ if ($section === 'formulaire_restrictions') {
App::flash('success', "Degrés d'ouverture mis à jour.");
}
} elseif ($section === 'objet_types') {
+ $rawThese = $_POST['objet_these_enabled'] ?? '(missing)';
+ $rawFrart = $_POST['objet_frart_enabled'] ?? '(missing)';
$newValues = [
'objet_these_enabled' => empty($_POST['objet_these_enabled']) ? '0' : '1',
'objet_frart_enabled' => empty($_POST['objet_frart_enabled']) ? '0' : '1',
];
+ error_log('[settings.php] SAVE objet_types | objet_these_enabled raw=' . var_export($rawThese, true) . ' | resolved=' . $newValues['objet_these_enabled']);
+ error_log('[settings.php] SAVE objet_types | objet_frart_enabled raw=' . var_export($rawFrart, true) . ' | resolved=' . $newValues['objet_frart_enabled']);
$db->setSetting('objet_these_enabled', $newValues['objet_these_enabled']);
$db->setSetting('objet_frart_enabled', $newValues['objet_frart_enabled']);
$logger->logObjetTypesUpdate($newValues);
diff --git a/app/public/assets/img/bars.svg b/app/public/assets/img/bars.svg
new file mode 100644
index 0000000..4e60ea6
--- /dev/null
+++ b/app/public/assets/img/bars.svg
@@ -0,0 +1,11 @@
+
diff --git a/app/storage/schema.sql b/app/storage/schema.sql
index 0920b3d..df04866 100644
--- a/app/storage/schema.sql
+++ b/app/storage/schema.sql
@@ -387,10 +387,10 @@ CREATE INDEX idx_thesis_tags_thesis ON thesis_tags(thesis_id);
-- VIEWS
-- ============================================================================
-CREATE VIEW v_smtp_active AS
+CREATE VIEW IF NOT EXISTS v_smtp_active AS
SELECT * FROM smtp_settings WHERE id = 1;
-CREATE VIEW v_theses_full AS
+CREATE VIEW IF NOT EXISTS v_theses_full AS
SELECT
t.id,
t.identifier,
@@ -450,7 +450,7 @@ LEFT JOIN thesis_tags tt ON t.id = tt.thesis_id
LEFT JOIN tags tg ON tt.tag_id = tg.id
GROUP BY t.id;
-CREATE VIEW v_theses_public AS
+CREATE VIEW IF NOT EXISTS v_theses_public AS
SELECT * FROM v_theses_full
WHERE is_published = 1;
diff --git a/app/templates/admin/acces.php b/app/templates/admin/acces.php
index 585b967..a0474ac 100644
--- a/app/templates/admin/acces.php
+++ b/app/templates/admin/acces.php
@@ -740,6 +740,19 @@
+%%%%%%% diff from: somsyvxz 249f7943 "Bulk bar anti-shift, tags icons, AP no-wrap, credits reorder" (rebased revision)
+\\\\\\\ to: rxpvwzkt 7fac18bc "feat(admin): add htmx toast feedback for settings checkboxes in contenus.php" (rebased revision)
++ $linkName = $link['name'] ?? '';
+++ $linkExpiresVal = $link['expires_at'] ? date('Y-m-d\TH:i', strtotime($link['expires_at'])) : '';
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% diff from: rxpvwzkt 7fac18bc "feat(admin): add htmx toast feedback for settings checkboxes in contenus.php" (rebased revision)
+\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ to: somsyvxz 249f7943 "Bulk bar anti-shift, tags icons, AP no-wrap, credits reorder" (rebased revision)
+- $linkName = $link['name'] ?? '';
+- $linkExpiresVal = $link['expires_at'] ? date('Y-m-d\TH:i', strtotime($link['expires_at'])) : '';
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% diff from: somsyvxz 14a3cd10 "Bulk bar anti-shift, tags icons, AP no-wrap, credits reorder" (rebase destination)
+\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ to: pqnovwxx 48308820 "fix(production): fix multiple remote server errors from nginx logs" (rebased revision)
+ $linkName = $link['name'] ?? '';
+ $linkExpiresVal = $link['expires_at'] ? date('Y-m-d\TH:i', strtotime($link['expires_at'])) : '';
+ $linkLockedYear = $link['locked_year'] ?? null;
++%%%%%%% diff from: somsyvxz 249f7943 "Bulk bar anti-shift, tags icons, AP no-wrap, credits reorder" (rebased revision)
++\\\\\\\ to: pqnovwxx eb519770 "fix(production): fix multiple remote server errors from nginx logs" (rebased revision)
+++ $linkName = $link['name'] ?? '';
++ $linkExpiresVal = $link['expires_at'] ? date('Y-m-d\TH:i', strtotime($link['expires_at'])) : '';
?>
diff --git a/app/templates/admin/contenus.php b/app/templates/admin/contenus.php
index 51de3fd..0f1b5b5 100644
--- a/app/templates/admin/contenus.php
+++ b/app/templates/admin/contenus.php
@@ -99,7 +99,9 @@
hx-trigger="change"
hx-target="#restrictions-response"
hx-swap="innerHTML"
- hx-include="#fieldset-restrictions">
+ hx-include="#fieldset-restrictions"
+ hx-on::before-request="console.log('[restrictions] sending checked=' + this.checked + ' POST keys will include all #fieldset-restrictions inputs')"
+ hx-on::after-request="console.log('[restrictions] response received')">
Activer la restriction d'accès
Pour les TFE de type "Interne", masquer les fichiers et exiger une demande d'accès par email. Les métadonnées et le résumé restent visibles publiquement.
@@ -125,7 +127,9 @@
hx-trigger="change"
hx-target="#acces-response"
hx-swap="innerHTML"
- hx-include="#fieldset-acces">
+ hx-include="#fieldset-acces"
+ hx-on::before-request="console.log('[acces-libre] sending checked=' + this.checked)"
+ hx-on::after-request="console.log('[acces-libre] response received')">
Libre
Libre accès — TFE accessible publiquement sur la plateforme et en bibliothèque
@@ -139,7 +143,9 @@
hx-trigger="change"
hx-target="#acces-response"
hx-swap="innerHTML"
- hx-include="#fieldset-acces">
+ hx-include="#fieldset-acces"
+ hx-on::before-request="console.log('[acces-interne] sending checked=' + this.checked)"
+ hx-on::after-request="console.log('[acces-interne] response received')">
Interne
TFE accessible uniquement sur place en physique
@@ -153,7 +159,9 @@
hx-trigger="change"
hx-target="#acces-response"
hx-swap="innerHTML"
- hx-include="#fieldset-acces">
+ hx-include="#fieldset-acces"
+ hx-on::before-request="console.log('[acces-interdit] sending checked=' + this.checked)"
+ hx-on::after-request="console.log('[acces-interdit] response received')">
Interdit
TFE non disponible en physique ni sur le site
@@ -188,7 +196,9 @@
hx-trigger="change"
hx-target="#types-response"
hx-swap="innerHTML"
- hx-include="#fieldset-types">
+ hx-include="#fieldset-types"
+ hx-on::before-request="console.log('[types-these] sending checked=' + this.checked)"
+ hx-on::after-request="console.log('[types-these] response received')">
Thèse
Thèses doctorales
@@ -202,7 +212,9 @@
hx-trigger="change"
hx-target="#types-response"
hx-swap="innerHTML"
- hx-include="#fieldset-types">
+ hx-include="#fieldset-types"
+ hx-on::before-request="console.log('[types-frart] sending checked=' + this.checked)"
+ hx-on::after-request="console.log('[types-frart] response received')">
Frart
Formation de recherche en art
diff --git a/app/templates/admin/footer.php b/app/templates/admin/footer.php
index 836ef56..925d2cc 100644
--- a/app/templates/admin/footer.php
+++ b/app/templates/admin/footer.php
@@ -15,6 +15,15 @@