From 7b80faa3729a3119fb47338e0e1464f84dad8485 Mon Sep 17 00:00:00 2001 From: Emidio Reggiani Date: Tue, 25 Nov 2025 19:38:11 +0100 Subject: [PATCH] Small bug fix in comments notification emails. --- system/includes/comments.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/system/includes/comments.php b/system/includes/comments.php index 88ecc15..bea6e06 100644 --- a/system/includes/comments.php +++ b/system/includes/comments.php @@ -643,7 +643,7 @@ function sendCommentNotifications($url, $newComment, $allComments, $notifyAdmin // Send emails foreach ($recipients as $email => $info) { - sendCommentEmail($email, $info['name'], $postId, $newComment, $info['type']); + sendCommentEmail($email, $info['name'], $url, $newComment, $info['type']); } } @@ -657,7 +657,7 @@ function sendCommentNotifications($url, $newComment, $allComments, $notifyAdmin * @param string $type Notification type (admin, parent, thread) * @return bool Success status */ -function sendCommentEmail($to, $toName, $postId, $comment, $type = 'admin') +function sendCommentEmail($to, $toName, $url, $comment, $type = 'admin') { try { $mail = new PHPMailer(true); @@ -691,7 +691,7 @@ function sendCommentEmail($to, $toName, $postId, $comment, $type = 'admin') if ($type === 'admin') { $mail->Subject = 'New comment awaiting moderation'; $mail->Body = " -

New comment on: $postId

+

New comment on: {$url}

From: {$comment['name']} ({$comment['email']})

Comment:

" . nl2br(htmlspecialchars($comment['comment'])) . "

@@ -700,11 +700,11 @@ function sendCommentEmail($to, $toName, $postId, $comment, $type = 'admin') } else { $mail->Subject = 'New reply to your comment'; $mail->Body = " -

Someone replied to your comment on: $postId

+

Someone replied to your comment on: {$url}

From: {$comment['name']}

Comment:

" . nl2br(htmlspecialchars($comment['comment'])) . "

-

View comment

+

View comment

"; }