From c63686cdd892b33fd8a91b58ef03ddd2346e621c Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Tue, 13 Mar 2018 10:45:09 -0600 Subject: [PATCH] Update xml_cdr.php --- app/xml_cdr/xml_cdr.php | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/app/xml_cdr/xml_cdr.php b/app/xml_cdr/xml_cdr.php index 36ab1c8562..bf0e5a641c 100644 --- a/app/xml_cdr/xml_cdr.php +++ b/app/xml_cdr/xml_cdr.php @@ -378,7 +378,9 @@ } echo th_order_by('caller_id_name', $text['label-cid-name'], $order_by, $order, null, null, $param); echo th_order_by('caller_id_number', $text['label-source'], $order_by, $order, null, null, $param); - echo th_order_by('caller_destination', $text['label-caller_destination'], $order_by, $order, null, null, $param); + if (permission_exists('caller_destination')) { + echo th_order_by('caller_destination', $text['label-caller_destination'], $order_by, $order, null, null, $param); + } echo th_order_by('destination_number', $text['label-destination'], $order_by, $order, null, null, $param); if (permission_exists('recording_play') || permission_exists('recording_download')) { echo "".$text['label-recording']."\n"; @@ -410,7 +412,7 @@ echo th_order_by('rtp_audio_in_mos', $text['label-mos'], $order_by, $order, null, "style='text-align: center;'", $param, $text['description-mos']); $col_count++; } - if (if_group("admin") || if_group("superadmin") || if_group("cdr")) { + if (permission_exists('hangup_cause')) { echo th_order_by('hangup_cause', $text['label-hangup_cause'], $order_by, $order, null, null, $param); } else { @@ -542,16 +544,18 @@ echo " "; echo " \n"; //caller destination - echo " "; - echo " \n"; - if (is_numeric($row['caller_destination'])) { - echo " ".format_phone($row['caller_destination']).' '; + if (permission_exists('caller_destination')) { + echo " "; + echo " \n"; + if (is_numeric($row['caller_destination'])) { + echo " ".format_phone($row['caller_destination']).' '; + } + else { + echo " ".$row['caller_destination'].' '; + } + echo " "; + echo " \n"; } - else { - echo " ".$row['caller_destination'].' '; - } - echo " "; - echo " \n"; //destination echo " "; echo " \n"; @@ -673,7 +677,7 @@ echo " $value\n"; } //hangup cause/call result - if (if_group("admin") || if_group("superadmin") || if_group("cdr")) { + if (permission_exists('hangup_cause')) { echo " ".$hangup_cause."\n"; } else {