From 6c26941d4fa3cbcc526c87ee795ba0a132bd6ff6 Mon Sep 17 00:00:00 2001 From: Nate Jones Date: Tue, 9 Dec 2014 18:55:17 +0000 Subject: [PATCH] Operator Panel: Show status change buttons only if extensions assigned to current user. --- app/operator_panel/index_inc.php | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/app/operator_panel/index_inc.php b/app/operator_panel/index_inc.php index 36c6d0e7e0..5ff78fdcdb 100644 --- a/app/operator_panel/index_inc.php +++ b/app/operator_panel/index_inc.php @@ -65,17 +65,18 @@ echo " "; echo " ".$text['title-operator_panel'].""; echo " "; echo " "; -echo " "; -$status_options = Array( - "Available" => $text['label-status_available'], - "Available (On Demand)" => $text['label-status_on_demand'], - "On Break" => $text['label-status_on_break'], - "Do Not Disturb" => $text['label-status_do_not_disturb'], - "Logged Out" => $text['label-status_logged_out'] - ); -foreach ($status_options as $status_value => $status_label) { - echo " "; +if (sizeof($_SESSION['user']['extensions']) > 0) { + $status_options = Array( + "Available" => $text['label-status_available'], + "Available (On Demand)" => $text['label-status_on_demand'], + "On Break" => $text['label-status_on_break'], + "Do Not Disturb" => $text['label-status_do_not_disturb'], + "Logged Out" => $text['label-status_logged_out'] + ); + foreach ($status_options as $status_value => $status_label) { + echo " "; + } } echo " ";