Merge pull request #1467 from mafoo/WhitespaceClean-app/xml_cdr
WhitespaceClean-app/xml_cdr
This commit is contained in:
@@ -80,10 +80,10 @@
|
|||||||
global $debug;
|
global $debug;
|
||||||
|
|
||||||
//fix the xml by escaping the contents of <sip_full_XXX>
|
//fix the xml by escaping the contents of <sip_full_XXX>
|
||||||
$xml_string = preg_replace_callback("/<([^><]+)>(.*?[><].*?)<\/\g1>/",
|
$xml_string = preg_replace_callback("/<([^><]+)>(.*?[><].*?)<\/\g1>/",
|
||||||
function ($matches) {
|
function ($matches) {
|
||||||
return '<' . $matches[1] . '>' .
|
return '<' . $matches[1] . '>' .
|
||||||
str_replace(">", ">",
|
str_replace(">", ">",
|
||||||
str_replace("<", "<", $matches[2])
|
str_replace("<", "<", $matches[2])
|
||||||
) .
|
) .
|
||||||
'</' . $matches[1] . '>';
|
'</' . $matches[1] . '>';
|
||||||
|
|||||||
@@ -82,7 +82,7 @@
|
|||||||
$db->beginTransaction();
|
$db->beginTransaction();
|
||||||
//reset the count
|
//reset the count
|
||||||
$x = 0;
|
$x = 0;
|
||||||
}
|
}
|
||||||
//parse the xml to get the call detail record info
|
//parse the xml to get the call detail record info
|
||||||
try {
|
try {
|
||||||
$xml = simplexml_load_string($xml_string);
|
$xml = simplexml_load_string($xml_string);
|
||||||
@@ -101,14 +101,14 @@
|
|||||||
echo $sql."\n";
|
echo $sql."\n";
|
||||||
$db->exec($sql);
|
$db->exec($sql);
|
||||||
$x++;
|
$x++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//save the transaction
|
//save the transaction
|
||||||
$db->commit();
|
$db->commit();
|
||||||
//echo finished
|
//echo finished
|
||||||
echo "completed\n";
|
echo "completed\n";
|
||||||
}
|
}
|
||||||
if ($xml_cdr_archive == "dir") {
|
if ($xml_cdr_archive == "dir") {
|
||||||
$xml_cdr_list = glob($_SESSION['switch']['log']['dir']."/xml_cdr/archive/*/*/*/*.xml");
|
$xml_cdr_list = glob($_SESSION['switch']['log']['dir']."/xml_cdr/archive/*/*/*/*.xml");
|
||||||
echo "count: ".count($xml_cdr_list)."\n";
|
echo "count: ".count($xml_cdr_list)."\n";
|
||||||
//print_r($xml_cdr_list);
|
//print_r($xml_cdr_list);
|
||||||
|
|||||||
@@ -125,7 +125,7 @@ else {
|
|||||||
} else {
|
} else {
|
||||||
$mos_comparison = '';
|
$mos_comparison = '';
|
||||||
}
|
}
|
||||||
//$mos_comparison = check_str($_REQUEST["mos_comparison"]);
|
//$mos_comparison = check_str($_REQUEST["mos_comparison"]);
|
||||||
$mos_score = check_str($_REQUEST["mos_score"]);
|
$mos_score = check_str($_REQUEST["mos_score"]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user