From 42b5d9dba1bff95c7f31c0ea85a4f9411ff9ded1 Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Tue, 6 Aug 2019 15:00:51 -0600 Subject: [PATCH] Update dialplans.php --- app/dialplans/dialplans.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/app/dialplans/dialplans.php b/app/dialplans/dialplans.php index c0380deecb..52b9434429 100644 --- a/app/dialplans/dialplans.php +++ b/app/dialplans/dialplans.php @@ -280,7 +280,9 @@ } echo th_order_by('dialplan_name', $text['label-name'], $order_by, $order, $app_uuid, null, (($search != '') ? "search=".escape($search) : null)); echo th_order_by('dialplan_number', $text['label-number'], $order_by, $order, $app_uuid, null, (($search != '') ? "search=".escape($search) : null)); - echo th_order_by('dialplan_context', $text['label-context'], $order_by, $order, $app_uuid, null, (($search != '') ? "search=".escape($search) : null)); + if (permission_exists('dialplan_context')) { + echo th_order_by('dialplan_context', $text['label-context'], $order_by, $order, $app_uuid, null, (($search != '') ? "search=".escape($search) : null)); + } echo th_order_by('dialplan_order', $text['label-order'], $order_by, $order, $app_uuid, "style='text-align: center;'", (($search != '') ? "search=".escape($search) : null)); echo th_order_by('dialplan_enabled', $text['label-enabled'], $order_by, $order, $app_uuid, "style='text-align: center;'", (($search != '') ? "search=".escape($search) : null)); echo th_order_by('dialplan_description', $text['label-description'], $order_by, $order, $app_uuid, null, (($search != '') ? "search=".escape($search) : null)); @@ -365,7 +367,9 @@ } echo " \n"; echo " ".((strlen($row['dialplan_number']) > 0) ? escape(format_phone($row['dialplan_number'])) : " ")."\n"; - echo " ".escape($row['dialplan_context'])."\n"; + if (permission_exists('dialplan_context')) { + echo " ".escape($row['dialplan_context'])."\n"; + } echo " ".escape($row['dialplan_order'])."\n"; echo " "; echo " ".$text['label-'.$row['dialplan_enabled']]."\n";