Fix
This commit is contained in:
parent
6b7bbaf8c9
commit
1c0a7355cc
@ -7,7 +7,7 @@ function addMeme(string $title, string $memeText, int $imageID): array
|
|||||||
{
|
{
|
||||||
global $mysqli;
|
global $mysqli;
|
||||||
$output = ["Status" => "Fail"];
|
$output = ["Status" => "Fail"];
|
||||||
$output["Permalink"] = "/" . fileExists($imageID, false) || "preco neexistujes";
|
$output["Permalink"] = fileExists($imageID, false) ? "super" : "dokelu";
|
||||||
if (isLoggedIn() && fileExists($imageID, false) && !empty($title) && !empty($memeText) && !empty($imageID) && $imageID > 0) {
|
if (isLoggedIn() && fileExists($imageID, false) && !empty($title) && !empty($memeText) && !empty($imageID) && $imageID > 0) {
|
||||||
$stmtMemeAdd = $mysqli->prepare('INSERT INTO Memes (AuthorID, Title, TextContent, FileID) VALUES (?, ?, ?, ?)');
|
$stmtMemeAdd = $mysqli->prepare('INSERT INTO Memes (AuthorID, Title, TextContent, FileID) VALUES (?, ?, ?, ?)');
|
||||||
$stmtMemeAdd->bind_param('issi', $_SESSION['ID'], htmlspecialchars($title), htmlspecialchars($memeText), $imageID);
|
$stmtMemeAdd->bind_param('issi', $_SESSION['ID'], htmlspecialchars($title), htmlspecialchars($memeText), $imageID);
|
||||||
|
Loading…
Reference in New Issue
Block a user