From 1e16d1a1ad873636a68f5f17f98c35964b9faf97 Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Mon, 19 Mar 2018 00:29:02 -0600 Subject: [PATCH] Update call_flows.php --- app/call_flows/call_flows.php | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/app/call_flows/call_flows.php b/app/call_flows/call_flows.php index db3a5fa96d..fcb833c753 100644 --- a/app/call_flows/call_flows.php +++ b/app/call_flows/call_flows.php @@ -108,7 +108,7 @@ $sql .= "limit $rows_per_page offset $offset "; $prep_statement = $db->prepare(check_sql($sql)); $prep_statement->execute(); - $result = $prep_statement->fetchAll(PDO::FETCH_NAMED); + $call_flows = $prep_statement->fetchAll(PDO::FETCH_NAMED); unset ($prep_statement, $sql); //alternate the row style @@ -150,6 +150,9 @@ //echo th_order_by('call_flow_alternate_sound', $text['label-call_flow_alternate_sound'], $order_by, $order); //echo th_order_by('call_flow_alternate_app', $text['label-call_flow_alternate_app'], $order_by, $order); //echo th_order_by('call_flow_alternate_data', $text['label-call_flow_alternate_data'], $order_by, $order); + if (permission_exists('call_flow_context')) { + echo th_order_by('call_flow_context', $text['label-call_flow_context'], $order_by, $order); + } echo th_order_by('call_flow_description', $text['label-call_flow_description'], $order_by, $order); echo ""; if (permission_exists('call_flow_add')) { @@ -161,8 +164,8 @@ echo "\n"; echo "\n"; - if (is_array($result)) { - foreach($result as $row) { + if (is_array($call_flows)) { + foreach($call_flows as $row) { if (permission_exists('call_flow_edit')) { $tr_link = "href='call_flow_edit.php?id=".$row['call_flow_uuid']."'"; } @@ -179,7 +182,9 @@ //echo " ".$row['call_flow_name']." \n"; echo " ".$row['call_flow_extension']." \n"; echo " ".$row['call_flow_feature_code']." \n"; - //echo " ".$row['call_flow_context']." \n"; + if (permission_exists('call_flow_context')) { + echo " ".$row['call_flow_context']." \n"; + } //echo " ".$row['call_flow_pin_number']." \n"; //echo " ".$row['call_flow_label']." \n"; //echo " ".$row['call_flow_sound']." \n"; @@ -201,7 +206,7 @@ echo "\n"; if ($c==0) { $c=1; } else { $c=0; } } //end foreach - unset($sql, $result, $row_count); + unset($sql, $call_flows, $row_count); } //end if results echo "\n";