mirror of
https://github.com/Mibew/java.git
synced 2025-01-22 17:40:35 +03:00
Update operator status in cache in notify_operator_alive function
This commit is contained in:
parent
fca7c3c7cd
commit
e4f172e715
@ -268,6 +268,7 @@ function create_operator($login, $email, $password, $localename, $commonname, $a
|
|||||||
*/
|
*/
|
||||||
function notify_operator_alive($operatorid, $istatus)
|
function notify_operator_alive($operatorid, $istatus)
|
||||||
{
|
{
|
||||||
|
global $mysqlprefix;
|
||||||
$db = Database::getInstance();
|
$db = Database::getInstance();
|
||||||
$db->query(
|
$db->query(
|
||||||
"update {chatoperator} set istatus = :istatus, dtmlastvisited = :now " .
|
"update {chatoperator} set istatus = :istatus, dtmlastvisited = :now " .
|
||||||
@ -278,6 +279,11 @@ function notify_operator_alive($operatorid, $istatus)
|
|||||||
':operatorid' => $operatorid
|
':operatorid' => $operatorid
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
if (isset($_SESSION["${mysqlprefix}operator"])) {
|
||||||
|
if ($_SESSION["${mysqlprefix}operator"]['operatorid'] == $operatorid) {
|
||||||
|
$_SESSION["${mysqlprefix}operator"]['istatus'] = $istatus;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user