From c6e5e230570272ce40f269a588111541f5dd4711 Mon Sep 17 00:00:00 2001 From: "Fedor A. Fetisov" Date: Tue, 24 Jan 2012 16:40:11 +0400 Subject: [PATCH 1/5] Fix bug in old threads cleansing --- src/messenger/webim/libs/chat.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/messenger/webim/libs/chat.php b/src/messenger/webim/libs/chat.php index ca48739d..23d2a55b 100644 --- a/src/messenger/webim/libs/chat.php +++ b/src/messenger/webim/libs/chat.php @@ -575,7 +575,7 @@ function close_old_threads($link) } $next_revision = next_revision($link); $query = "update ${mysqlprefix}chatthread set lrevision = $next_revision, dtmmodified = CURRENT_TIMESTAMP, istate = $state_closed " . - "where istate <> $state_closed and istate <> $state_left and " . + "where istate <> $state_closed and istate <> $state_left and lastpingagent <> 0 and lastpinguser <> 0 and " . "(ABS(UNIX_TIMESTAMP(CURRENT_TIMESTAMP) - UNIX_TIMESTAMP(lastpinguser)) > " . $settings['thread_lifetime'] . " and " . "ABS(UNIX_TIMESTAMP(CURRENT_TIMESTAMP) - UNIX_TIMESTAMP(lastpingagent)) > " . $settings['thread_lifetime'] . ")"; From e7d9e59f4d091581247da76a40c3f8e1330012f3 Mon Sep 17 00:00:00 2001 From: "Fedor A. Fetisov" Date: Tue, 24 Jan 2012 16:40:37 +0400 Subject: [PATCH 2/5] Increase default lifetime of the old threads --- src/messenger/webim/libs/common.php | 2 +- src/messenger/webim/locales/en/properties | 2 +- src/messenger/webim/locales/ru/properties | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/messenger/webim/libs/common.php b/src/messenger/webim/libs/common.php index b267a680..488740d5 100644 --- a/src/messenger/webim/libs/common.php +++ b/src/messenger/webim/libs/common.php @@ -672,7 +672,7 @@ $settings = array( 'geolinkparams' => 'width=440,height=100,toolbar=0,scrollbars=0,location=0,status=1,menubar=0,resizable=1', 'max_uploaded_file_size' => 100000, 'max_connections_from_one_host' => 10, - 'thread_lifetime' => 60, + 'thread_lifetime' => 600, 'email' => '', /* inbox for left messages */ 'left_messages_locale' => $home_locale, diff --git a/src/messenger/webim/locales/en/properties b/src/messenger/webim/locales/en/properties index 835c13fb..9f7941ff 100644 --- a/src/messenger/webim/locales/en/properties +++ b/src/messenger/webim/locales/en/properties @@ -504,7 +504,7 @@ settings.survey.askmessage=Show initial question field settings.title=Messenger settings settings.trackinglifetime.description=Specify the lifetime of old visitor's tracks in seconds. Default is 600 seconds. settings.trackinglifetime=Track lifetime -settings.threadlifetime.description=Specify the lifetime of the thread after closing the dialog box in seconds. Default is 60 seconds. Set 0 for unlimited thread lifetime. +settings.threadlifetime.description=Specify the lifetime of the thread after closing the dialog box in seconds. Default is 600 seconds. Set 0 for unlimited thread lifetime. settings.threadlifetime=Thread lifetime settings.usercanchangename.description=Turn off to hide edit box from chat window settings.usercanchangename=Allows users to change their names diff --git a/src/messenger/webim/locales/ru/properties b/src/messenger/webim/locales/ru/properties index e425cd1a..541292ae 100644 --- a/src/messenger/webim/locales/ru/properties +++ b/src/messenger/webim/locales/ru/properties @@ -494,7 +494,7 @@ settings.survey.askmessage= settings.title=Настройки мессенджера settings.trackinglifetime.description=Укажите срок хранения старых отслеженных путей в секундах. По умолчанию, 600 секунд. settings.trackinglifetime=Срок хранения отслеженных путей -settings.threadlifetime.description=Укажите время жизни диалога после закрытия диалогового окна в секундах. По умолчанию, 60 секунд. Укажите 0 для снятия ограничения. +settings.threadlifetime.description=Укажите время жизни диалога после закрытия диалогового окна в секундах. По умолчанию, 600 секунд. Укажите 0 для снятия ограничения. settings.threadlifetime=Время жизни диалога settings.usercanchangename.description=Возможность убрать поле смены имени из чат окна settings.usercanchangename=Разрешать посетителям менять имена From 0aaed55634b1e4aef764fd1e497a49346507eeeb Mon Sep 17 00:00:00 2001 From: "Fedor A. Fetisov" Date: Tue, 24 Jan 2012 16:41:15 +0400 Subject: [PATCH 3/5] Fix bug in button code generation --- src/messenger/webim/libs/getcode.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/messenger/webim/libs/getcode.php b/src/messenger/webim/libs/getcode.php index 6a229a14..c77ac03d 100644 --- a/src/messenger/webim/libs/getcode.php +++ b/src/messenger/webim/libs/getcode.php @@ -39,7 +39,7 @@ function generate_button($title, $locale, $style, $invitationstyle, $group, $inn $temp .= '