mirror of
https://github.com/Mibew/mibew.git
synced 2025-04-11 18:30:10 +03:00
A user cannot start chat if all groups offline
Revert changes made in 324f5bf94e
This commit is contained in:
parent
38bdf1318f
commit
cabdaed21d
@ -472,9 +472,21 @@ function has_online_operators($group_id = "")
|
|||||||
. "AND {operator}.operatorid = {operatortoopgroup}.operatorid "
|
. "AND {operator}.operatorid = {operatortoopgroup}.operatorid "
|
||||||
. "AND istatus = 0";
|
. "AND istatus = 0";
|
||||||
$values[':groupid'] = $group_id;
|
$values[':groupid'] = $group_id;
|
||||||
|
} else {
|
||||||
|
if (Settings::get('enablegroups') == 1) {
|
||||||
|
// If the groups and prechat survey are enabled and a button was
|
||||||
|
// generated not for concrete group a user must select a group to
|
||||||
|
// chat with. All groups will be checked for online operators. If
|
||||||
|
// only operators, who do not related with groups, are online a user
|
||||||
|
// cannot complete prechat survey because there will be no online
|
||||||
|
// groups. The following code fixes this strange behaviour.
|
||||||
|
$query .= ", {operatortoopgroup} "
|
||||||
|
. "WHERE {operator}.operatorid = {operatortoopgroup}.operatorid "
|
||||||
|
. "AND istatus = 0";
|
||||||
} else {
|
} else {
|
||||||
$query .= " WHERE istatus = 0";
|
$query .= " WHERE istatus = 0";
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$row = $db->query(
|
$row = $db->query(
|
||||||
$query,
|
$query,
|
||||||
|
Loading…
Reference in New Issue
Block a user