diff --git a/src/messenger/webim/libs/getcode.php b/src/messenger/webim/libs/getcode.php index 6a229a14..d1381526 100644 --- a/src/messenger/webim/libs/getcode.php +++ b/src/messenger/webim/libs/getcode.php @@ -53,16 +53,14 @@ function generate_button($title, $locale, $style, $invitationstyle, $group, $inn function verifyparam_groupid($paramid) { - global $settings, $errors; + global $errors; $groupid = ""; - if ($settings['enablegroups'] == '1') { - $groupid = verifyparam($paramid, "/^\d{0,8}$/", ""); - if ($groupid) { - $group = group_by_id($groupid); - if (!$group) { - $errors[] = getlocal("page.group.no_such"); - $groupid = ""; - } + $groupid = verifyparam($paramid, "/^\d{0,8}$/", ""); + if ($groupid) { + $group = group_by_id($groupid); + if (!$group) { + $errors[] = getlocal("page.group.no_such"); + $groupid = ""; } } return $groupid; @@ -70,16 +68,13 @@ function verifyparam_groupid($paramid) function get_groups_list() { - global $settings; $result = array(); - if ($settings['enablegroups'] == '1') { - $link = connect(); - $allgroups = get_all_groups($link); - close_connection($link); - $result[] = array('groupid' => '', 'vclocalname' => getlocal("page.gen_button.default_group")); - foreach ($allgroups as $g) { - $result[] = $g; - } + $link = connect(); + $allgroups = get_all_groups($link); + close_connection($link); + $result[] = array('groupid' => '', 'vclocalname' => getlocal("page.gen_button.default_group")); + foreach ($allgroups as $g) { + $result[] = $g; } return $result; } diff --git a/src/messenger/webim/libs/operator.php b/src/messenger/webim/libs/operator.php index 6fb5fd7c..14ee6416 100755 --- a/src/messenger/webim/libs/operator.php +++ b/src/messenger/webim/libs/operator.php @@ -381,7 +381,6 @@ function prepare_menu($operator, $hasright = true) if ($hasright) { loadsettings(); $page['showban'] = $settings['enableban'] == "1"; - $page['showgroups'] = $settings['enablegroups'] == "1"; $page['showstat'] = $settings['enablestatistics'] == "1"; $page['showadmin'] = is_capable($can_administrate, $operator); $page['currentopid'] = $operator['operatorid']; diff --git a/src/messenger/webim/libs/operator_settings.php b/src/messenger/webim/libs/operator_settings.php index edf112d7..1ede6ef7 100644 --- a/src/messenger/webim/libs/operator_settings.php +++ b/src/messenger/webim/libs/operator_settings.php @@ -25,20 +25,12 @@ function setup_operator_settings_tabs($opId, $active) loadsettings(); if ($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" : "" - ); - } + $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(); } diff --git a/src/messenger/webim/operator/canned.php b/src/messenger/webim/operator/canned.php index df828467..49b1a503 100644 --- a/src/messenger/webim/operator/canned.php +++ b/src/messenger/webim/operator/canned.php @@ -82,24 +82,22 @@ if (!$lang || !in_array($lang, $all_locales)) { # groups $groupid = ""; -if ($settings['enablegroups'] == '1') { - $groupid = verifyparam("group", "/^\d{0,8}$/", ""); - if ($groupid) { - $group = group_by_id($groupid); - if (!$group) { - $errors[] = getlocal("page.group.no_such"); - $groupid = ""; - } +$groupid = verifyparam("group", "/^\d{0,8}$/", ""); +if ($groupid) { + $group = group_by_id($groupid); + if (!$group) { + $errors[] = getlocal("page.group.no_such"); + $groupid = ""; } +} - $link = connect(); - $allgroups = get_all_groups($link); - close_connection($link); - $page['groups'] = array(); - $page['groups'][] = array('groupid' => '', 'vclocalname' => getlocal("page.gen_button.default_group")); - foreach ($allgroups as $g) { - $page['groups'][] = $g; - } +$link = connect(); +$allgroups = get_all_groups($link); +close_connection($link); +$page['groups'] = array(); +$page['groups'][] = array('groupid' => '', 'vclocalname' => getlocal("page.gen_button.default_group")); +foreach ($allgroups as $g) { + $page['groups'][] = $g; } # delete diff --git a/src/messenger/webim/operator/cannededit.php b/src/messenger/webim/operator/cannededit.php index 399f24d3..e8d1049d 100644 --- a/src/messenger/webim/operator/cannededit.php +++ b/src/messenger/webim/operator/cannededit.php @@ -69,9 +69,7 @@ if ($stringid) { $message = ""; $page['locale'] = verifyparam("lang", "/^[\w-]{2,5}$/", ""); $page['groupid'] = ""; - if ($settings['enablegroups'] == '1') { - $page['groupid'] = verifyparam("group", "/^\d{0,8}$/"); - } + $page['groupid'] = verifyparam("group", "/^\d{0,8}$/"); } if (isset($_POST['message'])) { diff --git a/src/messenger/webim/view/canned.php b/src/messenger/webim/view/canned.php index 3863aac8..dd9ed461 100644 --- a/src/messenger/webim/view/canned.php +++ b/src/messenger/webim/view/canned.php @@ -44,8 +44,7 @@ require_once('inc_errors.php'); echo ""; } ?> - - +

- +
diff --git a/src/messenger/webim/view/gen_button.php b/src/messenger/webim/view/gen_button.php index 10dcee8f..26bd1853 100644 --- a/src/messenger/webim/view/gen_button.php +++ b/src/messenger/webim/view/gen_button.php @@ -71,14 +71,12 @@ require_once('inc_errors.php');
-
-
diff --git a/src/messenger/webim/view/inc_menu.php b/src/messenger/webim/view/inc_menu.php index ce7dd780..9a31a041 100644 --- a/src/messenger/webim/view/inc_menu.php +++ b/src/messenger/webim/view/inc_menu.php @@ -56,9 +56,7 @@ function tpl_menu() { global $page, $webimroot, $errors; > > - > - > > > diff --git a/src/messenger/webim/view/menu.php b/src/messenger/webim/view/menu.php index 3441ed47..a6f878d3 100644 --- a/src/messenger/webim/view/menu.php +++ b/src/messenger/webim/view/menu.php @@ -118,7 +118,6 @@ $menuItemsCount = 2; - @@ -126,7 +125,6 @@ $menuItemsCount = 2; -