Rewrite some stuff

This commit is contained in:
Bruno Rybársky 2024-04-26 15:04:43 +02:00
parent 3be664d8c7
commit 0f2498a0fa

@ -109,7 +109,7 @@ function listFiles($onlyMine = true): array
if (!$onlyMine && !isModerator()) { if (!$onlyMine && !isModerator()) {
$onlyMine = true; $onlyMine = true;
} }
$query = "SELECT ID, Path, Type, UploadedAt, UploadedBy FROM Files"; $query = "SELECT ID, Path, Type, UploadedAt, UploadedBy FROM Files ORDER BY UploadedAt DESC";
if ($onlyMine) { if ($onlyMine) {
$query .= " WHERE UploadedBy = ?"; $query .= " WHERE UploadedBy = ?";