forked from norman/fusionpbx-install.sh-github-mirror
Bug Fix: on $action_name = 'both' there was no comma (#466)
No command when action_name was set to 'both' causing the SQL statement to be invalid
This commit is contained in:
committed by
GitHub
parent
c97579ab69
commit
f0154a9db8
@@ -166,13 +166,14 @@ crontab -e
|
|||||||
}
|
}
|
||||||
|
|
||||||
//update the database to the new directory
|
//update the database to the new directory
|
||||||
$sql = "update v_xml_cdr set \n";
|
$set_clauses = [];
|
||||||
if ($action_name == 'move' || $action_name == 'both') {
|
if ($action_name == 'move' || $action_name == 'both') {
|
||||||
$sql .= "record_path = '".$new_path."' \n";
|
$set_clauses[] = "record_path = '".$new_path."'";
|
||||||
}
|
}
|
||||||
if ($action_name == 'convert' || $action_name == 'both') {
|
if ($action_name == 'convert' || $action_name == 'both') {
|
||||||
$sql .= "record_name = '".$path_parts['filename'].".mp3'\n";
|
$set_clauses[] = "record_name = '".$path_parts['filename'].".mp3'";
|
||||||
}
|
}
|
||||||
|
$sql = "update v_xml_cdr set " . implode(", ", $set_clauses) . " \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