From 712c975e78393b49c398c05a0aadad8159956e7f Mon Sep 17 00:00:00 2001 From: Adam Zammit Date: Wed, 17 Jul 2013 10:33:03 +1000 Subject: [PATCH] Check if globally chat is enabled first --- index.php | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/index.php b/index.php index 9dc893e0..1e214744 100644 --- a/index.php +++ b/index.php @@ -158,7 +158,13 @@ $sc = $db->GetOne($sql); $ca = get_call_attempt($operator_id,true); $appointment = false; $availability = is_using_availability($case_id); -$chat = operator_chat_enabled($operator_id); + +$chatenabled = get_setting("chat_enabled"); +if (empty($chatenabled)) + $chatenabled = false; +else + $chatenabled = true; + if ($ca) { if (is_on_appointment($ca)) @@ -272,7 +278,7 @@ xhtml_object($data,"main-content"); - +
" id="tab-chat">

@@ -280,8 +286,6 @@ xhtml_object($data,"main-content");
- -
">