From bffe4b9f00a9166e4f4378693ce4343f2241bc3e Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Sat, 3 Dec 2016 11:49:51 -0700 Subject: [PATCH] Update voicemail_messages.php --- app/voicemails/voicemail_messages.php | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/app/voicemails/voicemail_messages.php b/app/voicemails/voicemail_messages.php index d77745e74f..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; @@ -253,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 + +?>