Update meme voting
This commit is contained in:
parent
8af1b6f073
commit
d6b8057053
@ -106,7 +106,7 @@ function doImageUpload($inFile, $outFile): bool
|
||||
|
||||
function listFiles($onlyMine = true): array
|
||||
{
|
||||
$output = ["Status" => "Fail"];
|
||||
$output = ["Status" => "Success"];
|
||||
require_once "lib/account.php";
|
||||
if (isLoggedIn()) {
|
||||
global $mysqli;
|
||||
@ -134,7 +134,7 @@ function listFiles($onlyMine = true): array
|
||||
$stmt->bind_result($id, $path, $type, $uploadedAt, $uploadedByID, $uploadedBy);
|
||||
|
||||
$stmt->execute();
|
||||
|
||||
$files = array();
|
||||
// Fetch the results into the bound variables
|
||||
while ($stmt->fetch()) {
|
||||
$files[] = [
|
||||
@ -148,10 +148,7 @@ function listFiles($onlyMine = true): array
|
||||
}
|
||||
|
||||
// Check if any results were fetched
|
||||
if (!empty($files)) {
|
||||
$output["Status"] = "Success";
|
||||
$output["Files"] = $files;
|
||||
}
|
||||
$output["Files"] = $files;
|
||||
|
||||
$stmt->close();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user