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 "