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";