forked from Adleraci/adlerka.top
MEME
This commit is contained in:
parent
5f6a2f8b15
commit
16f9dedce2
@ -183,7 +183,7 @@ function fileExists(int $fileId, bool $onlyMine = true): bool|string
|
|||||||
if (!$onlyMine && !isAdmin()) {
|
if (!$onlyMine && !isAdmin()) {
|
||||||
$onlyMine = true;
|
$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);
|
$stmtfileexists = $mysqli->prepare($query);
|
||||||
if ($onlyMine) {
|
if ($onlyMine) {
|
||||||
$stmtfileexists->bind_param('ii', $fileId, $_SESSION['id']);
|
$stmtfileexists->bind_param('ii', $fileId, $_SESSION['id']);
|
||||||
|
Loading…
Reference in New Issue
Block a user