From 778e7364e66a37078624dffd8e3cecdceef8e657 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 18 Feb 2024 23:23:01 +0100 Subject: [PATCH] Fix phpunit --- htdocs/core/class/html.formmail.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/core/class/html.formmail.class.php b/htdocs/core/class/html.formmail.class.php index aa366c31b2f..91a6bb5ec0e 100644 --- a/htdocs/core/class/html.formmail.class.php +++ b/htdocs/core/class/html.formmail.class.php @@ -1047,7 +1047,7 @@ class FormMail extends Form if ($this->withfckeditor) { $out .= $this->getModelEmailTemplate(); } - if (isModEnabled('ai')) { + if ($this->withaiprompt && isModEnabled('ai')) { $out .= $this->getSectionForAIPrompt(); } $out .= ''; @@ -1438,7 +1438,7 @@ class FormMail extends Form * * @return string Text for instructions */ - public function getSectionforAIPrompt() + public function getSectionForAIPrompt() { global $langs;