mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2026-01-06 11:43:50 +00:00
Update xml_cdr_delete.php (#3899)
* Update xml_cdr_delete.php Fix typo in delete() query * Update xml_cdr_delete.php Fix delete recording from filesystem and database * Fix Padding
This commit is contained in:
committed by
FusionPBX
parent
21c0c3492e
commit
838a05808c
@@ -49,15 +49,22 @@
|
||||
|
||||
if (sizeof($xml_cdr_uuids) > 0) {
|
||||
foreach ($xml_cdr_uuids as $index => $xml_cdr_uuid) {
|
||||
// delete record
|
||||
// delete record from v_xml_cdr
|
||||
$sql = "delete from v_xml_cdr ";
|
||||
$sql .= "where xml_cdr_uuid = '".$xml_cdr_uuid."' ";
|
||||
$prep_statement = $db->prepare(check_sql($sql));
|
||||
$prep_statement->execute();
|
||||
unset($sql, $prep_statement);
|
||||
//delete recording, if any
|
||||
if ($recording_file_path[$index] != '' && file_exists($_SESSION['switch']['recordings']['dir']."/".$_SESSION['domain_name'].base64_decode($recording_file_path[$index]))) {
|
||||
@unlink($_SESSION['switch']['recordings']['dir']."/".$_SESSION['domain_name'].base64_decode($recording_file_path[$index]));
|
||||
//delete recording from fs and v_call_recordings respectively, if any
|
||||
if ($recording_file_path[$index] != '' ) {
|
||||
$sql = "delete from v_call_recordings ";
|
||||
$sql .= "where call_recording_uuid = '".$xml_cdr_uuid."' ";
|
||||
$prep_statement = $db->prepare(check_sql($sql));
|
||||
$prep_statement->execute();
|
||||
unset($sql, $prep_statement);
|
||||
if (file_exists(base64_decode($recording_file_path[$index]))) {
|
||||
@unlink(base64_decode($recording_file_path[$index]));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user