mirror of
https://github.com/Mibew/i18n.git
synced 2025-01-23 05:40:30 +03:00
Fixed cloasing threads by timeout
This commit is contained in:
parent
f54acb3ae5
commit
36547eeeca
@ -661,10 +661,13 @@ function close_old_threads()
|
|||||||
$query = "update {chatthread} set lrevision = :next_revision, " .
|
$query = "update {chatthread} set lrevision = :next_revision, " .
|
||||||
"dtmmodified = CURRENT_TIMESTAMP, istate = :state_closed " .
|
"dtmmodified = CURRENT_TIMESTAMP, istate = :state_closed " .
|
||||||
"where istate <> :state_closed and istate <> :state_left " .
|
"where istate <> :state_closed and istate <> :state_left " .
|
||||||
"and lastpingagent <> 0 and lastpinguser <> 0 and " .
|
"and ((lastpingagent <> 0 and lastpinguser <> 0 and " .
|
||||||
"(ABS(UNIX_TIMESTAMP(CURRENT_TIMESTAMP) - UNIX_TIMESTAMP(lastpinguser)) > ".
|
"(ABS(UNIX_TIMESTAMP(CURRENT_TIMESTAMP) - UNIX_TIMESTAMP(lastpinguser)) > ".
|
||||||
":thread_lifetime and " .
|
":thread_lifetime and " .
|
||||||
"ABS(UNIX_TIMESTAMP(CURRENT_TIMESTAMP) - UNIX_TIMESTAMP(lastpingagent)) > ".
|
"ABS(UNIX_TIMESTAMP(CURRENT_TIMESTAMP) - UNIX_TIMESTAMP(lastpingagent)) > ".
|
||||||
|
":thread_lifetime)) or " .
|
||||||
|
"lastpingagent = 0 and lastpinguser <> 0 and " .
|
||||||
|
"ABS(UNIX_TIMESTAMP(CURRENT_TIMESTAMP) - UNIX_TIMESTAMP(lastpinguser)) > ".
|
||||||
":thread_lifetime)";
|
":thread_lifetime)";
|
||||||
|
|
||||||
$db->query(
|
$db->query(
|
||||||
|
Loading…
Reference in New Issue
Block a user