From 4d9340555660c5c2c08f606275915275ccc2637f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bruno=20Ryb=C3=A1rsky?= Date: Sat, 27 Apr 2024 11:51:01 +0200 Subject: [PATCH] Update meme voting --- lib/meme.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/meme.php b/lib/meme.php index 1a35562..e722f66 100644 --- a/lib/meme.php +++ b/lib/meme.php @@ -26,8 +26,8 @@ function renderMeme(int $id, int $authorId, string $title, string $textContent, $meme_out = str_replace('__TEMPLATE_MEME_AUTHOR__', htmlspecialchars($userNickname), $meme_out); $meme_out = str_replace('__TEMPLATE_MEME_DATE__', htmlspecialchars($createdAt), $meme_out); $meme_out = str_replace('__TEMPLATE_MEME_IMAGE__', '/' . htmlspecialchars($filePath), $meme_out); - $meme_out = str_replace('__TEMPLATE_MEME_IMAGE_WIDTH__', '/' . strval($imageWidth), $meme_out); - $meme_out = str_replace('__TEMPLATE_MEME_IMAGE_HEIGHT__', '/' . strval($imageHeight), $meme_out); + $meme_out = str_replace('__TEMPLATE_MEME_IMAGE_WIDTH__', strval($imageWidth), $meme_out); + $meme_out = str_replace('__TEMPLATE_MEME_IMAGE_HEIGHT__', strval($imageHeight), $meme_out); $meme_out = str_replace('__TEMPLATE_MEME_DELETE_BUTTON__', (isModerator() || $_SESSION['ID'] == $authorId) ? "" : '', $meme_out); $meme_votes = calculateNetVotes($id);