mirror of
https://github.com/Mibew/tray.git
synced 2025-01-22 18:10:34 +03:00
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:
parent
13554a8e43
commit
450e970ed8
@ -184,9 +184,14 @@ function has_online_operators($groupid = "")
|
|||||||
if ($groupid) {
|
if ($groupid) {
|
||||||
$query .= ", ${mysqlprefix}chatgroupoperator where groupid = $groupid and ${mysqlprefix}chatoperator.operatorid = " .
|
$query .= ", ${mysqlprefix}chatgroupoperator where groupid = $groupid and ${mysqlprefix}chatoperator.operatorid = " .
|
||||||
"${mysqlprefix}chatgroupoperator.operatorid and istatus = 0";
|
"${mysqlprefix}chatgroupoperator.operatorid and istatus = 0";
|
||||||
|
} else {
|
||||||
|
if ($settings['enablegroups'] == 1) {
|
||||||
|
$query .= ", ${mysqlprefix}chatgroupoperator where ${mysqlprefix}chatoperator.operatorid = " .
|
||||||
|
"${mysqlprefix}chatgroupoperator.operatorid and istatus = 0";
|
||||||
} else {
|
} else {
|
||||||
$query .= " where istatus = 0";
|
$query .= " where istatus = 0";
|
||||||
}
|
}
|
||||||
|
}
|
||||||
$row = select_one_row($query, $link);
|
$row = select_one_row($query, $link);
|
||||||
close_connection($link);
|
close_connection($link);
|
||||||
return $row['time'] < $settings['online_timeout'] && $row['total'] > 0;
|
return $row['time'] < $settings['online_timeout'] && $row['total'] > 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user