From 19b14f16f877c3ae2f9fc78b30959ca44334a396 Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Wed, 5 Jul 2017 10:23:47 -0600 Subject: [PATCH] Update voicemail_edit.php --- app/voicemails/voicemail_edit.php | 40 ++++++++++++++++++------------- 1 file changed, 24 insertions(+), 16 deletions(-) diff --git a/app/voicemails/voicemail_edit.php b/app/voicemails/voicemail_edit.php index 234c6047b1..7345e80391 100644 --- a/app/voicemails/voicemail_edit.php +++ b/app/voicemails/voicemail_edit.php @@ -156,7 +156,9 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) { $sql .= "voicemail_transcription_enabled, "; $sql .= "voicemail_tutorial, "; $sql .= "voicemail_file, "; - $sql .= "voicemail_local_after_email, "; + if (permission_exists('voicemail_local_after_email')) { + $sql .= "voicemail_local_after_email, "; + } $sql .= "voicemail_enabled, "; $sql .= "voicemail_description "; $sql .= ")"; @@ -173,7 +175,9 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) { $sql .= "'".$voicemail_transcription_enabled."', "; $sql .= "'".$voicemail_tutorial."', "; $sql .= "'".$voicemail_file."', "; - $sql .= "'".$voicemail_local_after_email."', "; + if (permission_exists('voicemail_local_after_email')) { + $sql .= "'".$voicemail_local_after_email."', "; + } $sql .= "'".$voicemail_enabled."', "; $sql .= "'".$voicemail_description."' "; $sql .= ")"; @@ -194,7 +198,9 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) { $sql .= "voicemail_transcription_enabled = '".$voicemail_transcription_enabled."', "; $sql .= "voicemail_tutorial = '".$voicemail_tutorial."', "; $sql .= "voicemail_file = '".$voicemail_file."', "; - $sql .= "voicemail_local_after_email = '".$voicemail_local_after_email."', "; + if (permission_exists('voicemail_local_after_email')) { + $sql .= "voicemail_local_after_email = '".$voicemail_local_after_email."', "; + } $sql .= "voicemail_enabled = '".$voicemail_enabled."', "; $sql .= "voicemail_description = '".$voicemail_description."' "; $sql .= "where domain_uuid = '".$domain_uuid."' "; @@ -562,19 +568,21 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) { echo "\n"; echo "\n"; - echo "\n"; - echo "\n"; - echo " ".$text['label-voicemail_local_after_email']."\n"; - echo "\n"; - echo "\n"; - echo " \n"; - echo "
\n"; - echo $text['description-voicemail_local_after_email']."\n"; - echo "\n"; - echo "\n"; + if (permission_exists('voicemail_local_after_email')) { + echo "\n"; + echo "\n"; + echo " ".$text['label-voicemail_local_after_email']."\n"; + echo "\n"; + echo "\n"; + echo " \n"; + echo "
\n"; + echo $text['description-voicemail_local_after_email']."\n"; + echo "\n"; + echo "\n"; + } if ($action == "update") { echo " ";