Skip to content

Commit

Permalink
Update voicemail_greeting_edit.php
Browse files Browse the repository at this point in the history
  • Loading branch information
markjcrane committed Nov 28, 2019
1 parent b584973 commit 9e837fa
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions app/voicemail_greetings/voicemail_greeting_edit.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
The Initial Developer of the Original Code is
Mark J Crane <markjcrane@fusionpbx.com>
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):
Expand All @@ -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"];
Expand All @@ -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;
Expand Down Expand Up @@ -107,7 +107,6 @@

//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 ";
Expand Down Expand Up @@ -136,7 +135,7 @@
echo "<table cellpadding='0' cellspacing='0' border='0' align='right'>\n";
echo "<tr>\n";
echo "<td nowrap='nowrap'>\n";
echo " <input type='button' class='btn' name='' alt='".$text['button-back']."' onclick=\"window.location='voicemail_greetings.php?id=".$voicemail_id."'\" value='".$text['button-back']."'>";
echo " <input type='button' class='btn' name='' alt='".$text['button-back']."' onclick=\"window.location='voicemail_greetings.php?id=".urlencode($voicemail_id)."'\" value='".$text['button-back']."'>";
echo " <input type='submit' name='submit' class='btn' value='".$text['button-save']."'>\n";
echo "</td>\n";
echo "</tr>\n";
Expand Down Expand Up @@ -184,4 +183,4 @@
//include the footer
require_once "resources/footer.php";

?>
?>

0 comments on commit 9e837fa

Please sign in to comment.