mirror of
https://codeberg.org/PostERG/xamxam.git
synced 2026-06-25 16:19:19 +02:00
cleanup modal: list stale files to remove; storage restructure: documents/ → {objet}/
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/**
|
||||
* File browser fragment — returns a clickable directory tree of documents/ + theses/.
|
||||
* File browser fragment — returns a clickable directory tree of tfe/ these/ frart/ documents/ + theses/.
|
||||
*
|
||||
* GET /admin/fragments/file-browser.php?dir=documents/2025
|
||||
*
|
||||
@@ -17,7 +17,7 @@ error_log('[file-browser] ENTRY | dir=' . ($_GET['dir'] ?? '(root)') . ' | stora
|
||||
|
||||
// Determine which directory to browse
|
||||
$relDir = trim($_GET['dir'] ?? '', '/');
|
||||
if ($relDir !== '' && !preg_match('#^(documents|theses)(/|$)#', $relDir)) {
|
||||
if ($relDir !== '' && !preg_match('#^(tfe|these|frart|documents|theses)(/|$)#', $relDir)) {
|
||||
$relDir = '';
|
||||
}
|
||||
|
||||
@@ -84,7 +84,7 @@ if ($relDir !== '') {
|
||||
$parentDir = implode('/', $parentParts);
|
||||
}
|
||||
|
||||
$rootDirs = ['documents', 'theses'];
|
||||
$rootDirs = ['tfe', 'these', 'frart', 'documents', 'theses'];
|
||||
|
||||
// SVG icon for a given extension
|
||||
function fileIcon(string $ext): string {
|
||||
|
||||
Reference in New Issue
Block a user