mirror of
https://codeberg.org/PostERG/xamxam.git
synced 2026-06-25 16:19:19 +02:00
add file export system for admins
- ExportController: getAllThesisFiles(), buildExportManifest(), createExportZip() builds a ZIP archive with manifest.json + files/ mirror of storage/theses/ - Database: getAllThesisFilesForExport() queries all thesis_files + identifier - AdminLogger: logFilesExport() audit log entry - admin/actions/export-files.php: thin dispatcher, streams zip with headers - templates/admin/index.php: 'Exporter fichiers' button next to CSV export
This commit is contained in:
@@ -2188,6 +2188,21 @@ class Database
|
||||
')->fetchAll();
|
||||
}
|
||||
|
||||
/**
|
||||
* All thesis files for the file-export ZIP.
|
||||
* Includes every thesis_files column + the thesis identifier for manifest
|
||||
* construction.
|
||||
*/
|
||||
public function getAllThesisFilesForExport(): array
|
||||
{
|
||||
return $this->pdo->query('
|
||||
SELECT tf.*, t.identifier
|
||||
FROM thesis_files tf
|
||||
JOIN theses t ON t.id = tf.thesis_id
|
||||
ORDER BY t.year DESC, t.title ASC, tf.sort_order ASC
|
||||
')->fetchAll();
|
||||
}
|
||||
|
||||
// ========================================================================
|
||||
// SINGLETON PATTERN ENFORCEMENT
|
||||
// ========================================================================
|
||||
|
||||
Reference in New Issue
Block a user