From ba8f6260587815bf702cee8903d74d2cf38ed4e2 Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Sat, 11 Apr 2026 18:22:53 +0000 Subject: [PATCH] Update call_recordings.php --- debian/resources/maintenance/call_recordings.php | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/debian/resources/maintenance/call_recordings.php b/debian/resources/maintenance/call_recordings.php index 8558bae..6d81ba3 100644 --- a/debian/resources/maintenance/call_recordings.php +++ b/debian/resources/maintenance/call_recordings.php @@ -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);