From 95b7c30254b71971c9270d912b2ad60b2b6c1c11 Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Thu, 28 Nov 2019 03:04:23 -0700 Subject: [PATCH] Update voicemail_greeting_edit.php --- .../voicemail_greeting_edit.php | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/app/voicemail_greetings/voicemail_greeting_edit.php b/app/voicemail_greetings/voicemail_greeting_edit.php index ac631c0185..37377353b7 100644 --- a/app/voicemail_greetings/voicemail_greeting_edit.php +++ b/app/voicemail_greetings/voicemail_greeting_edit.php @@ -17,7 +17,7 @@ The Initial Developer of the Original Code is Mark J Crane - Portions created by the Initial Developer are Copyright (C) 2008-2018 + Portions created by the Initial Developer are Copyright (C) 2008-2019 the Initial Developer. All Rights Reserved. Contributor(s): @@ -42,13 +42,15 @@ $language = new text; $text = $language->get(); -//get greeting id +//validate the uuids if (is_uuid($_REQUEST["id"])) { $voicemail_greeting_uuid = $_REQUEST["id"]; } + if (is_uuid($_REQUEST["voicemail_id"])) { + $voicemail_id = $_REQUEST["voicemail_id"]; + } //get the form value and set to php variables - $voicemail_id = $_REQUEST["voicemail_id"]; if (count($_POST) > 0) { $greeting_name = $_POST["greeting_name"]; $greeting_description = $_POST["greeting_description"]; @@ -58,8 +60,6 @@ } if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) { - //get greeting uuid to edit - $voicemail_greeting_uuid = $_POST["voicemail_greeting_uuid"]; //validate the token $token = new token; @@ -107,7 +107,6 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) { //pre-populate the form if (count($_GET) > 0 && $_POST["persistformvar"] != "true") { - $voicemail_greeting_uuid = $_GET["id"]; $sql = "select * from v_voicemail_greetings "; $sql .= "where domain_uuid = :domain_uuid "; $sql .= "and voicemail_greeting_uuid = :voicemail_greeting_uuid "; @@ -136,7 +135,7 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) { echo "\n"; echo "\n"; echo "\n"; echo "\n"; @@ -184,4 +183,4 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) { //include the footer require_once "resources/footer.php"; -?> \ No newline at end of file +?>
\n"; - echo " "; + echo " "; echo " \n"; echo "