From b9198484255111c5fdfb2b67e1649c77d396aa82 Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Mon, 11 Dec 2023 11:51:19 -0700 Subject: [PATCH] Only include transcribe.php if enabled --- app/email_queue/resources/jobs/email_send.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/email_queue/resources/jobs/email_send.php b/app/email_queue/resources/jobs/email_send.php index 1987d72f27..8dd6b7674c 100644 --- a/app/email_queue/resources/jobs/email_send.php +++ b/app/email_queue/resources/jobs/email_send.php @@ -11,7 +11,6 @@ //include files include "resources/classes/permissions.php"; - require $_SERVER['DOCUMENT_ROOT']."/app/email_queue/resources/functions/transcribe.php"; //increase limits set_time_limit(0); @@ -221,8 +220,9 @@ } } - if (isset($voicemail_transcription_enabled) && $voicemail_transcription_enabled == 'true') { + if (isset($voicemail_transcription_enabled) && $voicemail_transcription_enabled === 'true') { //transcribe the attachment + require $_SERVER['DOCUMENT_ROOT']."/app/email_queue/resources/functions/transcribe.php"; if ($email_attachment_type == 'wav' || $email_attachment_type == 'mp3') { $field = transcribe($email_attachment_path, $email_attachment_name, $email_attachment_type); echo "transcribe path: ".$email_attachment_path."\n"; @@ -536,3 +536,4 @@ //fclose($esl); ?> +