mirror of
https://github.com/Mibew/design.git
synced 2024-11-15 17:34:12 +03:00
improve users.php loading speed (major fix)
git-svn-id: https://webim.svn.sourceforge.net/svnroot/webim/trunk@455 c66351dc-e62f-0410-b875-e3a5c0b9693f
This commit is contained in:
parent
54a39f982e
commit
c8979afbff
@ -104,7 +104,7 @@ function thread_to_xml($thread,$link) {
|
||||
}
|
||||
|
||||
function print_pending_threads($groupids,$since) {
|
||||
global $webim_encoding, $settings;
|
||||
global $webim_encoding, $settings, $state_closed;
|
||||
$link = connect();
|
||||
|
||||
$revision = $since;
|
||||
@ -112,6 +112,9 @@ function print_pending_threads($groupids,$since) {
|
||||
$query = "select threadid, userName, agentName, unix_timestamp(dtmcreated), userTyping, ".
|
||||
"unix_timestamp(dtmmodified), lrevision, istate, remote, nextagent, agentId, userid, shownmessageid, userAgent, (select vclocalname from chatgroup where chatgroup.groupid = chatthread.groupid) as groupname ".
|
||||
"from chatthread where lrevision > $since ".
|
||||
($since <= 0
|
||||
? "AND istate <> $state_closed "
|
||||
: "").
|
||||
($settings['enablegroups'] == '1'
|
||||
? "AND (groupid is NULL".($groupids
|
||||
? " OR groupid IN ($groupids)"
|
||||
|
Loading…
Reference in New Issue
Block a user