Fix Call Recordings single delete.

This commit is contained in:
Nate
2019-09-19 12:31:36 -06:00
parent 675c05329f
commit 81bf68cf68
3 changed files with 71 additions and 6 deletions

View File

@@ -1,5 +1,4 @@
<?php <?php
#This file was last reorganized on 19th of September 2017 08:54:24 AM UTC
$text['title-call_recordings']['en-us'] = "Call Recordings"; $text['title-call_recordings']['en-us'] = "Call Recordings";
$text['title-call_recordings']['ar-eg'] = ""; $text['title-call_recordings']['ar-eg'] = "";
@@ -341,4 +340,64 @@ $text['description-call_recording_base64']['ru-ru'] = "";
$text['description-call_recording_base64']['sv-se'] = ""; $text['description-call_recording_base64']['sv-se'] = "";
$text['description-call_recording_base64']['uk-ua'] = ""; $text['description-call_recording_base64']['uk-ua'] = "";
?> $text['label-inbound']['en-us'] = "Inbound";
$text['label-inbound']['ar-eg'] = "Inbound";
$text['label-inbound']['de-at'] = "Inbound";
$text['label-inbound']['de-ch'] = "Inbound";
$text['label-inbound']['de-de'] = "Inbound";
$text['label-inbound']['es-cl'] = "Inbound";
$text['label-inbound']['es-mx'] = "Inbound";
$text['label-inbound']['fr-ca'] = "Inbound";
$text['label-inbound']['fr-fr'] = "Inbound";
$text['label-inbound']['he-il'] = "Inbound";
$text['label-inbound']['it-it'] = "Inbound";
$text['label-inbound']['nl-nl'] = "Inbound";
$text['label-inbound']['pl-pl'] = "Inbound";
$text['label-inbound']['pt-br'] = "Inbound";
$text['label-inbound']['pt-pt'] = "Inbound";
$text['label-inbound']['ro-ro'] = "Inbound";
$text['label-inbound']['ru-ru'] = "Inbound";
$text['label-inbound']['sv-se'] = "Inbound";
$text['label-inbound']['uk-ua'] = "Inbound";
$text['label-outbound']['en-us'] = "Outbound";
$text['label-outbound']['ar-eg'] = "Outbound";
$text['label-outbound']['de-at'] = "Outbound";
$text['label-outbound']['de-ch'] = "Outbound";
$text['label-outbound']['de-de'] = "Outbound";
$text['label-outbound']['es-cl'] = "Outbound";
$text['label-outbound']['es-mx'] = "Outbound";
$text['label-outbound']['fr-ca'] = "Outbound";
$text['label-outbound']['fr-fr'] = "Outbound";
$text['label-outbound']['he-il'] = "Outbound";
$text['label-outbound']['it-it'] = "Outbound";
$text['label-outbound']['nl-nl'] = "Outbound";
$text['label-outbound']['pl-pl'] = "Outbound";
$text['label-outbound']['pt-br'] = "Outbound";
$text['label-outbound']['pt-pt'] = "Outbound";
$text['label-outbound']['ro-ro'] = "Outbound";
$text['label-outbound']['ru-ru'] = "Outbound";
$text['label-outbound']['sv-se'] = "Outbound";
$text['label-outbound']['uk-ua'] = "Outbound";
$text['label-local']['en-us'] = "Local";
$text['label-local']['ar-eg'] = "Local";
$text['label-local']['de-at'] = "Local";
$text['label-local']['de-ch'] = "Local";
$text['label-local']['de-de'] = "Local";
$text['label-local']['es-cl'] = "Local";
$text['label-local']['es-mx'] = "Local";
$text['label-local']['fr-ca'] = "Local";
$text['label-local']['fr-fr'] = "Local";
$text['label-local']['he-il'] = "Local";
$text['label-local']['it-it'] = "Local";
$text['label-local']['nl-nl'] = "Local";
$text['label-local']['pl-pl'] = "Local";
$text['label-local']['pt-br'] = "Local";
$text['label-local']['pt-pt'] = "Local";
$text['label-local']['ro-ro'] = "Local";
$text['label-local']['ru-ru'] = "Local";
$text['label-local']['sv-se'] = "Local";
$text['label-local']['uk-ua'] = "Local";
?>

View File

@@ -78,6 +78,9 @@
$obj->delete($call_recordings); $obj->delete($call_recordings);
//delete message //delete message
message::add($text['message-delete']); message::add($text['message-delete']);
//redirect
header('Location: call_recordings.php');
exit;
} }
} }
@@ -239,7 +242,7 @@
//echo " </td>\n"; //echo " </td>\n";
echo " <td valign='top' class='".$row_style[$c]."'>".($row['call_recording_length'] <= 59 ? '0:' : null).escape($row['call_recording_length'])."&nbsp;</td>\n"; echo " <td valign='top' class='".$row_style[$c]."'>".($row['call_recording_length'] <= 59 ? '0:' : null).escape($row['call_recording_length'])."&nbsp;</td>\n";
echo " <td valign='top' class='".$row_style[$c]."'>".escape($row['call_recording_date'])."&nbsp;</td>\n"; echo " <td valign='top' class='".$row_style[$c]."'>".escape($row['call_recording_date'])."&nbsp;</td>\n";
echo " <td valign='top' class='".$row_style[$c]."'>".escape($row['call_direction'])."&nbsp;</td>\n"; echo " <td valign='top' class='".$row_style[$c]."'>".($row['call_direction'] != '' ? escape($text['label-'.$row['call_direction']]) : null)."&nbsp;</td>\n";
echo " <td valign='top' class='row_stylebg'>".escape($row['call_recording_description'])."&nbsp;</td>\n"; echo " <td valign='top' class='row_stylebg'>".escape($row['call_recording_description'])."&nbsp;</td>\n";
//echo " <td valign='top' class='".$row_style[$c]."'>".escape($row['call_recording_base64'])."&nbsp;</td>\n"; //echo " <td valign='top' class='".$row_style[$c]."'>".escape($row['call_recording_base64'])."&nbsp;</td>\n";
echo " <td class='list_control_icons'>"; echo " <td class='list_control_icons'>";
@@ -250,7 +253,7 @@
echo "<button type='button' class='btn btn-default list_control_icon' name='' alt='".$text['button-edit']."' onclick=\"window.location='call_recording_edit.php?id=".escape($row['call_recording_uuid'])."'\" value='edit'><span class='fas fa-pencil-alt'></span></input>\n"; echo "<button type='button' class='btn btn-default list_control_icon' name='' alt='".$text['button-edit']."' onclick=\"window.location='call_recording_edit.php?id=".escape($row['call_recording_uuid'])."'\" value='edit'><span class='fas fa-pencil-alt'></span></input>\n";
} }
if (permission_exists('call_recording_delete')) { if (permission_exists('call_recording_delete')) {
echo "<button type='submit' class='btn btn-default list_control_icon' name=\"call_recordings[$x][action]\" alt='".$text['button-delete']."' value='delete'><span class='fas fa-minus'></span></button>\n"; echo "<button type='submit' class='btn btn-default list_control_icon' name=\"call_recordings[$x][action]\" alt='".$text['button-delete']."' value='delete' onclick=\"$('#checkbox_".$x."').prop('checked', true);\"><span class='fas fa-minus'></span></button>\n";
} }
echo " </td>\n"; echo " </td>\n";
echo "</tr>\n"; echo "</tr>\n";

View File

@@ -149,8 +149,11 @@
if (!function_exists('is_uuid')) { if (!function_exists('is_uuid')) {
function is_uuid($uuid) { function is_uuid($uuid) {
$regex = '/^[0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12}$/i'; if (gettype($uuid) == 'string') {
return preg_match($regex, $uuid); $regex = '/^[0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12}$/i';
return preg_match($regex, $uuid);
}
return false;
} }
} }