mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2025-12-30 00:53:50 +00:00
CDR Functiality Fix Extended Data Logic (#1897)
Raw data field was not being pulled so logic was broken, added derived field raw_data_exists to sql statement, instead of pulling raw data with query. Also added logic to hide the view extended data icon on the right side of table.
This commit is contained in:
@@ -464,7 +464,7 @@
|
||||
echo "<tr id='recording_progress_bar_".$row['uuid']."' style='display: none;'><td class='".$row_style[$c]." playback_progress_bar_background' style='padding: 0; border: none;' colspan='".((if_group("admin") || if_group("superadmin") || if_group("cdr")) ? ($col_count - 1) : $col_count)."'><span class='playback_progress_bar' id='recording_progress_".$row['uuid']."'></span></td></tr>\n";
|
||||
}
|
||||
|
||||
if (isset($row['json']) && (if_group("admin") || if_group("superadmin") || if_group("cdr"))) {
|
||||
if ($row['raw_data_exists'] && (if_group("admin") || if_group("superadmin") || if_group("cdr"))) {
|
||||
$tr_link = "href='xml_cdr_details.php?uuid=".$row['uuid'].(($_REQUEST['showall']) ? "&showall=true" : null)."'";
|
||||
}
|
||||
else {
|
||||
@@ -630,7 +630,9 @@
|
||||
//control icons
|
||||
if (if_group("admin") || if_group("superadmin") || if_group("cdr")) {
|
||||
echo " <td class='list_control_icons tr_link_void' nowrap='nowrap'>";
|
||||
echo " <a $tr_link title='".$text['button-view']."'>$v_link_label_view</a>"; //CJB
|
||||
if ($tr_link!=null) {
|
||||
echo " <a $tr_link title='".$text['button-view']."'>$v_link_label_view</a>"; //CJB
|
||||
}
|
||||
if (permission_exists('xml_cdr_delete')) {
|
||||
echo "<a href='xml_cdr_delete.php?id[]=".$row['uuid']."&rec[]=".(($recording_file_path != '') ? base64_encode($recording_file_path) : null)."' alt='".$text['button-delete']."' onclick=\"return confirm('".$text['confirm-delete']."')\">".$v_link_label_delete."</a>";
|
||||
}
|
||||
|
||||
@@ -340,6 +340,7 @@
|
||||
$sql .= "caller_id_number, ";
|
||||
$sql .= "source_number, ";
|
||||
$sql .= "destination_number, ";
|
||||
$sql .= "(xml IS NOT NULL OR json IS NOT NULL) AS raw_data_exists, ";
|
||||
if (is_array($_SESSION['cdr']['field'])) {
|
||||
foreach ($_SESSION['cdr']['field'] as $field) {
|
||||
$sql .= $field.", ";
|
||||
|
||||
Reference in New Issue
Block a user