From bcd7482e5c1ecea6328425bacc2e982f06891e4b Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Tue, 15 Jun 2021 13:44:14 -0600 Subject: [PATCH] Use elseif instead of a series of if statements. --- app/xml_cdr/resources/classes/xml_cdr.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/xml_cdr/resources/classes/xml_cdr.php b/app/xml_cdr/resources/classes/xml_cdr.php index d05f8ac22a..90986daac5 100644 --- a/app/xml_cdr/resources/classes/xml_cdr.php +++ b/app/xml_cdr/resources/classes/xml_cdr.php @@ -340,13 +340,13 @@ if (!class_exists('xml_cdr')) { //set missed calls $missed_call = 'false'; - if ($xml->variables->cc_side != "agent" && strlen($xml->variables->originating_leg_uuid) == 0 && $xml->variables->call_direction != 'outbound' && strlen($xml->variables->answer_stamp) == 0) { - $missed_call = 'true'; - } if ($xml->variables->missed_call == 'true') { $missed_call = 'true'; } - if ($xml->variables->voicemail_action == "save" && strlen($xml->variables->bridge_uuid) > 0) { + elseif ($xml->variables->cc_side != "agent" && strlen($xml->variables->originating_leg_uuid) == 0 && $xml->variables->call_direction != 'outbound' && strlen($xml->variables->answer_stamp) == 0) { + $missed_call = 'true'; + } + elseif ($xml->variables->voicemail_action == "save" && strlen($xml->variables->bridge_uuid) > 0) { $missed_call = 'true'; }