forked from norman/fusionpbx-install.sh-github-mirror
Update call_recordings.php
This commit is contained in:
12
debian/resources/maintenance/call_recordings.php
vendored
12
debian/resources/maintenance/call_recordings.php
vendored
@@ -165,15 +165,17 @@ crontab -e
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//update the database to the new directory
|
//set the sql update params
|
||||||
$set_clauses = [];
|
$sql_params = [];
|
||||||
if ($action_name == 'move' || $action_name == 'both') {
|
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') {
|
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";
|
$sql .= "where xml_cdr_uuid = '".$row['xml_cdr_uuid']."';\n";
|
||||||
if ($debug) { echo $sql."\n"; }
|
if ($debug) { echo $sql."\n"; }
|
||||||
$database->execute($sql);
|
$database->execute($sql);
|
||||||
|
|||||||
Reference in New Issue
Block a user