bug fix for voicemail edit transcription

This commit is contained in:
Tony Fernandez 2025-03-18 11:26:16 -04:00
parent 6d356194ba
commit 687ba8f554
1 changed files with 4 additions and 2 deletions

View File

@ -41,8 +41,9 @@
$language = new text;
$text = $language->get();
//initialize the destinations object
//initialize the core objects
$destination = new destinations;
$settings = new settings(['database' => $database, 'domain_uuid' => $domain_uuid, 'user_uuid' => $user_uuid]);
//action add or update
if (!empty($_REQUEST["id"]) && is_uuid($_REQUEST["id"])) {
@ -63,6 +64,7 @@
$voicemail_option_digits = '';
$voicemail_option_description = '';
$voicemail_mail_to = '';
$transcribe_enabled = $settings->get('transcribe', 'enabled', false);
//get http variables and set them to php variables
$referer_path = $_REQUEST["referer_path"] ?? '';
@ -833,7 +835,7 @@
echo "</tr>\n";
}
if (permission_exists('voicemail_transcription_enabled') && filter_var($_SESSION['transcribe']['enabled']['boolean'] ?? false, FILTER_VALIDATE_BOOL)) {
if (permission_exists('voicemail_transcription_enabled') && $transcribe_enabled) {
echo "<tr>\n";
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
echo " ".$text['label-voicemail_transcription_enabled']."\n";