diff --git a/src/messenger/webim/libs/operator_settings.php b/src/messenger/webim/libs/operator_settings.php index 79f3388a..faff09db 100644 --- a/src/messenger/webim/libs/operator_settings.php +++ b/src/messenger/webim/libs/operator_settings.php @@ -13,14 +13,24 @@ */ function setup_operator_settings_tabs($opId, $active) { - global $page, $webimroot; + global $page, $webimroot, $settings; + loadsettings(); + if($opId) { - $page['tabs'] = array( - getlocal("page_agent.tab.main") => $active != 0 ? "$webimroot/operator/operator.php?op=$opId" : "", - getlocal("page_agent.tab.avatar") => $active != 1 ? "$webimroot/operator/avatar.php?op=$opId" : "", - getlocal("page_agent.tab.groups") => $active != 2 ? "$webimroot/operator/opgroups.php?op=$opId" : "", - getlocal("page_agent.tab.permissions") => $active != 3 ? "$webimroot/operator/permissions.php?op=$opId" : "" - ); + if($settings['enablegroups'] == '1') { + $page['tabs'] = array( + getlocal("page_agent.tab.main") => $active != 0 ? "$webimroot/operator/operator.php?op=$opId" : "", + getlocal("page_agent.tab.avatar") => $active != 1 ? "$webimroot/operator/avatar.php?op=$opId" : "", + getlocal("page_agent.tab.groups") => $active != 2 ? "$webimroot/operator/opgroups.php?op=$opId" : "", + getlocal("page_agent.tab.permissions") => $active != 3 ? "$webimroot/operator/permissions.php?op=$opId" : "" + ); + } else { + $page['tabs'] = array( + getlocal("page_agent.tab.main") => $active != 0 ? "$webimroot/operator/operator.php?op=$opId" : "", + getlocal("page_agent.tab.avatar") => $active != 1 ? "$webimroot/operator/avatar.php?op=$opId" : "", + getlocal("page_agent.tab.permissions") => $active != 3 ? "$webimroot/operator/permissions.php?op=$opId" : "" + ); + } } else { $page['tabs'] = array(); } diff --git a/src/messenger/webim/locales/en/properties b/src/messenger/webim/locales/en/properties index 28215214..5daa8ae0 100644 --- a/src/messenger/webim/locales/en/properties +++ b/src/messenger/webim/locales/en/properties @@ -187,7 +187,8 @@ menu.translate=Localize my_settings.error.password_match=Entered passwords do not match no_such_operator=No such operator operator.groups.title=Operator groups -operator.groups.intro=Choose groups according to operator skills. +operator.groups.intro=Choose groups according to operator skills. +operator.group.no_description=<no description> page.analysis.search.head_host=Visitor's address page.analysis.search.head_messages=Visitor's messages page.analysis.search.head_name=Name diff --git a/src/messenger/webim/operator/groups.php b/src/messenger/webim/operator/groups.php index 5b95e879..1eda8bcf 100644 --- a/src/messenger/webim/operator/groups.php +++ b/src/messenger/webim/operator/groups.php @@ -25,6 +25,8 @@ if( isset($_GET['act']) && $_GET['act'] == 'del' ) { $link = connect(); perform_query("delete from chatgroup where groupid = $groupid",$link); + perform_query("delete from chatgroupoperator where groupid = $groupid",$link); + perform_query("update chatthread set groupid = 0 where groupid = $groupid",$link); mysql_close($link); header("Location: $webimroot/operator/groups.php"); exit; diff --git a/src/messenger/webim/view/operator_groups.php b/src/messenger/webim/view/operator_groups.php index c5a908d9..5f37eb1f 100644 --- a/src/messenger/webim/view/operator_groups.php +++ b/src/messenger/webim/view/operator_groups.php @@ -45,11 +45,11 @@ require_once('inc_errors.php');

-
+
/>
-
+