diff --git a/app/voicemails/voicemail_messages.php b/app/voicemails/voicemail_messages.php index 24156a94a9..bcf4c61773 100644 --- a/app/voicemails/voicemail_messages.php +++ b/app/voicemails/voicemail_messages.php @@ -23,18 +23,22 @@ Contributor(s): Mark J Crane */ + +//includes require_once "root.php"; require_once "resources/require.php"; -if (!(check_str($_REQUEST["action"]) == "download" && check_str($_REQUEST["src"]) == "email")) { - require_once "resources/check_auth.php"; - if (permission_exists('voicemail_message_view')) { - //access granted + +//check permissions + if (!(check_str($_REQUEST["action"]) == "download" && check_str($_REQUEST["src"]) == "email")) { + require_once "resources/check_auth.php"; + if (permission_exists('voicemail_message_view')) { + //access granted + } + else { + echo "access denied"; + exit; + } } - else { - echo "access denied"; - exit; - } -} //add multi-lingual support $language = new text; @@ -137,6 +141,9 @@ if (!(check_str($_REQUEST["action"]) == "download" && check_str($_REQUEST["src"] if ($_SESSION['voicemail']['storage_type']['text'] != 'base64') { echo "".$text['label-message_size']."\n"; } + if ($_SESSION['voicemail']['transcribe_enabled']['boolean'] == 'true') { + echo "".$text['label-transcription']."\n"; + } if (permission_exists('voicemail_message_delete')) { echo ""; echo "".$v_link_label_delete.""; @@ -177,10 +184,14 @@ if (!(check_str($_REQUEST["action"]) == "download" && check_str($_REQUEST["src"] echo "".$v_link_label_play.""; echo "".$v_link_label_download.""; echo " \n"; - echo " ".$row['message_length_label']." \n"; + echo " ".$row['message_length_label']." \n"; if ($_SESSION['voicemail']['storage_type']['text'] != 'base64') { echo " ".$row['file_size_label']."\n"; } + if ($_SESSION['voicemail']['transcribe_enabled']['boolean'] == 'true') { + echo " ".$row['message_transcription']."\n"; + } + if (permission_exists('voicemail_message_delete')) { echo " "; echo "".$v_link_label_delete.""; @@ -246,4 +257,5 @@ if (!(check_str($_REQUEST["action"]) == "download" && check_str($_REQUEST["src"] //include the footer require_once "resources/footer.php"; -?> \ No newline at end of file + +?>