Skip to content
Permalink
Browse files

Added title of the FAQ/news in the comment notification mail

  • Loading branch information
thorsten committed Nov 30, 2019
1 parent e9300f9 commit 917fe438c80c6d27c6a4e2b21475df4082c884d5
Showing with 5 additions and 1 deletion.
  1. +5 −1 phpmyfaq/ajaxservice.php
@@ -175,12 +175,14 @@
if ($oComment->addComment($commentData)) {
$emailTo = $faqConfig->get('main.administrationMail');
$title = '';
$urlToContent = '';
if ('faq' == $type) {
$faq->getRecord($id);
if ($faq->faqRecord['email'] != '') {
$emailTo = $faq->faqRecord['email'];
}
$title = $faq->getRecordTitle($id);
$faqUrl = sprintf(
'%s?action=artikel&cat=%d&id=%d&artlang=%s',
$faqConfig->getDefaultUrl(),
@@ -198,6 +200,7 @@
if ($news['authorEmail'] != '') {
$emailTo = $news['authorEmail'];
}
$title = $news['header'];
$link = sprintf('%s?action=news&newsid=%d&newslang=%s',
$faqConfig->getDefaultUrl(),
$news['id'],
@@ -210,6 +213,7 @@
$commentMail =
'User: '.$commentData['username'].', mailto:'.$commentData['usermail']."\n".
'Title: ' . $title . "\n" .
'New comment posted on: '.$urlToContent.
"\n\n".
wordwrap($comment, 72);
@@ -240,7 +244,7 @@
}
}
$mail->subject = '%sitename%';
$mailer->subject = '%sitename%: ' . $title;
$mail->message = strip_tags($commentMail);
$result = $mail->send();
unset($mail);

0 comments on commit 917fe43

Please sign in to comment.
You can’t perform that action at this time.