Update call_recordings.php

This commit is contained in:
FusionPBX
2026-04-11 18:22:53 +00:00
committed by GitHub
parent f0154a9db8
commit ba8f626058

View File

@@ -165,15 +165,17 @@ crontab -e
}
}
//update the database to the new directory
$set_clauses = [];
//set the sql update params
$sql_params = [];
if ($action_name == 'move' || $action_name == 'both') {
$set_clauses[] = "record_path = '".$new_path."'";
$sql_params[] = "record_path = '".$new_path."'";
}
if ($action_name == 'convert' || $action_name == 'both') {
$set_clauses[] = "record_name = '".$path_parts['filename'].".mp3'";
$sql_params[] = "record_name = '".$path_parts['filename'].".mp3'";
}
$sql = "update v_xml_cdr set " . implode(", ", $set_clauses) . " \n";
//update the database to the new directory
$sql = "update v_xml_cdr set " . implode(", ", $sql_params) . " \n";
$sql .= "where xml_cdr_uuid = '".$row['xml_cdr_uuid']."';\n";
if ($debug) { echo $sql."\n"; }
$database->execute($sql);