From 16f9dedce2bbe85d21b0d8d278e8e142bdab7ca0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bruno=20Ryb=C3=A1rsky?= Date: Thu, 25 Apr 2024 22:51:51 +0200 Subject: [PATCH] MEME --- lib/upload.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/upload.php b/lib/upload.php index 16950dd..3b0b1ce 100644 --- a/lib/upload.php +++ b/lib/upload.php @@ -183,7 +183,7 @@ function fileExists(int $fileId, bool $onlyMine = true): bool|string if (!$onlyMine && !isAdmin()) { $onlyMine = true; } - $query = 'SELECT Path FROM Files WHERE ID = ?' . $onlyMine ? ' AND UploadedBy = ?' : ''; + $query = 'SELECT Path FROM Files WHERE ID = ?' . ($onlyMine ? ' AND UploadedBy = ?' : ''); $stmtfileexists = $mysqli->prepare($query); if ($onlyMine) { $stmtfileexists->bind_param('ii', $fileId, $_SESSION['id']);