When enabled the groups, visitors cannot start a chat, if only operators, who don't relate to any groups, online.

This commit is contained in:
Dmitriy Simushev 2012-01-15 20:51:12 +00:00
parent 13554a8e43
commit 450e970ed8

View File

@ -185,7 +185,12 @@ function has_online_operators($groupid = "")
$query .= ", ${mysqlprefix}chatgroupoperator where groupid = $groupid and ${mysqlprefix}chatoperator.operatorid = " .
"${mysqlprefix}chatgroupoperator.operatorid and istatus = 0";
} else {
$query .= " where istatus = 0";
if ($settings['enablegroups'] == 1) {
$query .= ", ${mysqlprefix}chatgroupoperator where ${mysqlprefix}chatoperator.operatorid = " .
"${mysqlprefix}chatgroupoperator.operatorid and istatus = 0";
} else {
$query .= " where istatus = 0";
}
}
$row = select_one_row($query, $link);
close_connection($link);