From 9f1cfc2ed44147b72b48eda08641aa795525c99e Mon Sep 17 00:00:00 2001 From: bruno Date: Thu, 25 Apr 2024 09:45:28 +0200 Subject: [PATCH] Test meme rendering --- lib/meme.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/meme.php b/lib/meme.php index 656a58a..c0f62cb 100644 --- a/lib/meme.php +++ b/lib/meme.php @@ -5,7 +5,7 @@ function addMeme(string $memeText, int $imageID): bool global $mysqli; if (isLoggedIn() && fileExists($imageID)) { - $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($memeText), $imageID); $stmtMemeAdd->execute(); return true; @@ -44,7 +44,7 @@ function renderMemeGallery(): string // Bind the result variables $stmtlist->bind_result($memeID, $title, $textContent, $createdAt, $filePath, $fileType, $userNickname); - $meme_gallery_template = file_get_contents($routerConfig->template_dir . "meme_gallery.html"); + $meme_gallery_template = file_get_contents($routerConfig['template_dir'] . 'meme_gallery.html'); // Fetch the results $memes_out = '';