MEME
This commit is contained in:
parent
79d5722bfb
commit
06ad8d3627
@ -183,6 +183,7 @@ function fileExists(int $fileId, bool $onlyMine = true): bool|string
|
|||||||
if (!$onlyMine && !isAdmin()) {
|
if (!$onlyMine && !isAdmin()) {
|
||||||
$onlyMine = true;
|
$onlyMine = true;
|
||||||
}
|
}
|
||||||
|
echo "whyya";
|
||||||
$query = $onlyMine ? 'SELECT Path FROM Files WHERE ID = ? AND UploadedBy = ?' : 'SELECT Path FROM Files WHERE ID = ?';
|
$query = $onlyMine ? 'SELECT Path FROM Files WHERE ID = ? AND UploadedBy = ?' : 'SELECT Path FROM Files WHERE ID = ?';
|
||||||
$stmtfileexists = $mysqli->prepare($query);
|
$stmtfileexists = $mysqli->prepare($query);
|
||||||
if ($onlyMine) {
|
if ($onlyMine) {
|
||||||
@ -195,7 +196,6 @@ function fileExists(int $fileId, bool $onlyMine = true): bool|string
|
|||||||
$stmtfileexists->execute();
|
$stmtfileexists->execute();
|
||||||
if ($stmtfileexists->num_rows > 0){
|
if ($stmtfileexists->num_rows > 0){
|
||||||
return $filePath;
|
return $filePath;
|
||||||
echo "whyy";
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
return false;
|
return false;
|
||||||
|
Loading…
Reference in New Issue
Block a user