diff --git a/app/xml_cdr/resources/dashboard/recent_calls.php b/app/xml_cdr/resources/dashboard/recent_calls.php index 1fecc19016..e86585e635 100644 --- a/app/xml_cdr/resources/dashboard/recent_calls.php +++ b/app/xml_cdr/resources/dashboard/recent_calls.php @@ -30,7 +30,7 @@ unset($assigned_extension); //if also viewing system status, show more recent calls (more room avaialble) - $recent_limit = (is_array($selected_blocks) && in_array('counts', $selected_blocks)) ? 10 : 5; + $recent_limit = isset($selected_blocks) && is_array($selected_blocks) && in_array('counts', $selected_blocks) ? 10 : 5; //get the recent calls from call detail records $sql = " @@ -158,7 +158,7 @@ $tmp_year = date("Y", strtotime($row['start_stamp'])); $tmp_month = date("M", strtotime($row['start_stamp'])); $tmp_day = date("d", strtotime($row['start_stamp'])); - $tmp_start_epoch = ($_SESSION['domain']['time_format']['text'] == '12h') ? date("n/j g:ia", $row['start_epoch']) : date("n/j H:i", $row['start_epoch']); + $tmp_start_epoch = !empty($_SESSION['domain']['time_format']) && $_SESSION['domain']['time_format']['text'] == '12h' ? date("n/j g:ia", $row['start_epoch']) : date("n/j H:i", $row['start_epoch']); //determine name $cdr_name = ($row['direction'] == 'inbound' || ($row['direction'] == 'local' && is_array($assigned_extensions) && in_array($row['destination_number'], $assigned_extensions))) ? $row['caller_id_name'] : $row['destination_number']; @@ -219,7 +219,7 @@ echo "\n"; echo "".$text['label-view_all']."\n"; echo ""; - $n++; + //$n++; echo ""; echo "\n";