Fix a few more voicemail gui issues: make sure the back button returns to the correct page, fix the redirect after deleting a voicemail. Fix the voicemail delete mp3 files or other sounds files other than wav or mp3.
This commit is contained in:
@@ -40,12 +40,17 @@ else {
|
||||
$text[$key] = $value[$_SESSION['domain']['language']['code']];
|
||||
}
|
||||
|
||||
//get the id
|
||||
//get the HTTP values and set them as variables
|
||||
if (count($_GET)>0) {
|
||||
$id = check_str($_GET["id"]);
|
||||
$voicemail_uuid = check_str($_GET["voicemail_uuid"]);
|
||||
}
|
||||
|
||||
//set the referrer
|
||||
$http_referer = parse_url($_SERVER["HTTP_REFERER"]);
|
||||
$referer_path = $http_referer['path'];
|
||||
$referer_query = $http_referer['query'];
|
||||
|
||||
//delete the voicemail message
|
||||
if (strlen($id)>0) {
|
||||
require_once "resources/classes/voicemail.php";
|
||||
@@ -53,7 +58,6 @@ else {
|
||||
$voicemail->db = $db;
|
||||
$voicemail->domain_uuid = $_SESSION['domain_uuid'];
|
||||
$voicemail->voicemail_uuid = $voicemail_uuid;
|
||||
$voicemail->voicemail_id = $voicemail_id;
|
||||
$voicemail->voicemail_message_uuid = $id;
|
||||
$result = $voicemail->message_delete();
|
||||
unset($voicemail);
|
||||
@@ -61,7 +65,12 @@ else {
|
||||
|
||||
//redirect the user
|
||||
require_once "resources/header.php";
|
||||
echo "<meta http-equiv=\"refresh\" content=\"2;url=voicemail_messages.php?id=$voicemail_uuid\">\n";
|
||||
if ($referer_path == "/app/voicemails/voicemail_messages.php") {
|
||||
echo "<meta http-equiv=\"refresh\" content=\"2;url=voicemail_messages.php?".$referer_query."\">\n";
|
||||
}
|
||||
else {
|
||||
echo "<meta http-equiv=\"refresh\" content=\"2;url=voicemails.php\">\n";
|
||||
}
|
||||
echo "<div align='center'>\n";
|
||||
echo "Delete Complete\n";
|
||||
echo "</div>\n";
|
||||
|
||||
Reference in New Issue
Block a user