mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2026-01-06 11:43:50 +00:00
Update xml_cdr service
Use array_slice to make the code more efficient Service is unable to create the directories. Make the failed directories with app_defaults when run from command line. php /var/www/fusionpbx/core/upgrade/upgrade.php chown -R www-data:www-data /var/log/freeswitch/xml_cdr
This commit is contained in:
@@ -359,14 +359,8 @@
|
||||
//load the string into an xml object
|
||||
$xml = simplexml_load_string($xml_string, 'SimpleXMLElement', LIBXML_NOCDATA);
|
||||
if ($xml === false) {
|
||||
|
||||
//failed to load the XML, move the XML file to the failed directory
|
||||
if (!empty($xml_cdr_dir)) {
|
||||
if (!file_exists($xml_cdr_dir.'/failed/invalid_xml')) {
|
||||
if (!mkdir($xml_cdr_dir.'/failed/invalid_xml', 0660, true)) {
|
||||
die('Failed to create '.$xml_cdr_dir.'/failed');
|
||||
}
|
||||
}
|
||||
rename($xml_cdr_dir.'/'.$this->file, $xml_cdr_dir.'/failed/invalid_xml/'.$this->file);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user