From a7170051c6b133fc77c1ffd3c4201283d094b42e Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Sat, 23 Feb 2019 17:07:45 -0700 Subject: [PATCH] Update time_conditions.php --- app/time_conditions/time_conditions.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/app/time_conditions/time_conditions.php b/app/time_conditions/time_conditions.php index 203210504e..12e55944c8 100644 --- a/app/time_conditions/time_conditions.php +++ b/app/time_conditions/time_conditions.php @@ -178,7 +178,9 @@ } echo th_order_by('dialplan_name', $text['label-name'], $order_by, $order, $app_uuid, null, (($search != '') ? "search=".$search : null)); echo th_order_by('dialplan_number', $text['label-number'], $order_by, $order, $app_uuid, null, (($search != '') ? "search=".$search : null)); - echo th_order_by('dialplan_context', $text['label-context'], $order_by, $order, $app_uuid, null, (($search != '') ? "search=".$search : null)); + if (permission_exists('time_condition_context')) { + echo th_order_by('dialplan_context', $text['label-context'], $order_by, $order, $app_uuid, null, (($search != '') ? "search=".$search : null)); + } echo th_order_by('dialplan_order', $text['label-order'], $order_by, $order, $app_uuid, "style='text-align: center;'", (($search != '') ? "search=".$search : null)); echo th_order_by('dialplan_enabled', $text['label-enabled'], $order_by, $order, $app_uuid, "style='text-align: center;'", (($search != '') ? "search=".$search : null)); echo th_order_by('dialplan_description', $text['label-description'], $order_by, $order, $app_uuid, null, (($search != '') ? "search=".$search : null)); @@ -212,7 +214,9 @@ } echo " \n"; echo " ".((strlen($row['dialplan_number']) > 0) ? $row['dialplan_number'] : " ")."\n"; - echo " ".escape($row['dialplan_context'])."\n"; + if (permission_exists('time_condition_context')) { + echo " ".escape($row['dialplan_context'])."\n"; + } echo " ".escape($row['dialplan_order'])."\n"; echo " "; echo " ".ucwords(escape($row['dialplan_enabled']))."\n";