mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2025-12-30 00:53:50 +00:00
Fix xml_cdr_details fix application log
When there's a single app in the app log it's saved as an single object in the json not as an array of objects
This commit is contained in:
@@ -388,8 +388,16 @@
|
||||
//foreach($array["variables"] as $key => $value) {
|
||||
if (is_array($array["app_log"]["application"])) {
|
||||
foreach ($array["app_log"]["application"] as $row) {
|
||||
$app_name = $row["@attributes"]["app_name"];
|
||||
$app_data = urldecode($row["@attributes"]["app_data"]);
|
||||
//single app
|
||||
if ($key == "@attributes") {
|
||||
$app_name = $row["app_name"];
|
||||
$app_data = urldecode($row["app_data"]);
|
||||
}
|
||||
//multiple apps
|
||||
else {
|
||||
$app_name = $row["@attributes"]["app_name"];
|
||||
$app_data = urldecode($row["@attributes"]["app_data"]);
|
||||
}
|
||||
echo "<tr >\n";
|
||||
echo " <td valign='top' align='left' class='".$row_style[$c]."'>".escape($app_name)." </td>\n";
|
||||
echo " <td valign='top' align='left' class='".$row_style[$c]."'>".escape(wordwrap($app_data,75,"\n", true))." </td>\n";
|
||||
|
||||
Reference in New Issue
Block a user