From 59903ce11aaf87abfe6cb10647bbf53a996887ed Mon Sep 17 00:00:00 2001 From: Evgeny Gryaznov Date: Mon, 10 Aug 2009 13:50:25 +0000 Subject: [PATCH] recompute message kinds, move option "Max connections from one host" to performance page git-svn-id: https://webim.svn.sourceforge.net/svnroot/webim/trunk@614 c66351dc-e62f-0410-b875-e3a5c0b9693f --- src/messenger/webim/locales/names/level1 | 3 +++ src/messenger/webim/locales/names/level2 | 3 +++ src/messenger/webim/operator/performance.php | 11 +++++++++-- src/messenger/webim/operator/settings.php | 8 +------- src/messenger/webim/view/performance.php | 9 +++++++++ src/messenger/webim/view/settings.php | 9 --------- 6 files changed, 25 insertions(+), 18 deletions(-) diff --git a/src/messenger/webim/locales/names/level1 b/src/messenger/webim/locales/names/level1 index 77b781a0..beacbdc3 100644 --- a/src/messenger/webim/locales/names/level1 +++ b/src/messenger/webim/locales/names/level1 @@ -1,6 +1,7 @@ chat.came.from chat.client.changename chat.client.name +chat.client.visited.page chat.default.username chat.error_page.close chat.error_page.head @@ -36,6 +37,7 @@ chat.window.toolbar.mail_history chat.window.toolbar.redirect_user chat.window.toolbar.refresh company.title +errors.captcha errors.required errors.wrong_field form.field.email @@ -53,6 +55,7 @@ leavemessage.perform leavemessage.sent.message leavemessage.sent.title leavemessage.title +license.title localeid mail.user.history.body mail.user.history.subject diff --git a/src/messenger/webim/locales/names/level2 b/src/messenger/webim/locales/names/level2 index f2ed2881..6ceba3f3 100644 --- a/src/messenger/webim/locales/names/level2 +++ b/src/messenger/webim/locales/names/level2 @@ -23,6 +23,7 @@ cannededit.no_such cannededit.title cannednew.descr cannednew.title +char.redirect.operator.away_suff char.redirect.operator.online_suff chat.client.spam.prefix chat.redirect.back @@ -119,6 +120,8 @@ page_search.intro pending.menu.hide pending.menu.show pending.popup_notification +pending.status.setaway +pending.status.setonline pending.table.ban pending.table.head.contactid pending.table.head.etc diff --git a/src/messenger/webim/operator/performance.php b/src/messenger/webim/operator/performance.php index 8c1ee61e..cbafb3ff 100644 --- a/src/messenger/webim/operator/performance.php +++ b/src/messenger/webim/operator/performance.php @@ -29,7 +29,8 @@ $page = array('agentId' => ''); $errors = array(); $options = array( - 'online_timeout', 'updatefrequency_operator', 'updatefrequency_chat', 'updatefrequency_oldchat'); + 'online_timeout', 'updatefrequency_operator', 'updatefrequency_chat', + 'updatefrequency_oldchat', 'max_connections_from_one_host'); loadsettings(); $params = array(); @@ -57,7 +58,12 @@ if (isset($_POST['onlinetimeout'])) { if(!is_numeric($params['updatefrequency_oldchat'])) { $errors[] = wrong_field("settings.frequencyoldchat"); } - + + $params['max_connections_from_one_host'] = getparam('onehostconnections'); + if(!is_numeric($params['max_connections_from_one_host'])) { + $errors[] = getlocal("settings.wrong.onehostconnections"); + } + if (count($errors) == 0) { foreach($options as $opt) { $settings[$opt] = $params[$opt]; @@ -72,6 +78,7 @@ $page['formonlinetimeout'] = $params['online_timeout']; $page['formfrequencyoperator'] = $params['updatefrequency_operator']; $page['formfrequencychat'] = $params['updatefrequency_chat']; $page['formfrequencyoldchat'] = $params['updatefrequency_oldchat']; +$page['formonehostconnections'] = $params['max_connections_from_one_host']; $page['stored'] = isset($_GET['stored']); prepare_menu($operator); diff --git a/src/messenger/webim/operator/settings.php b/src/messenger/webim/operator/settings.php index 53357a00..031d2b92 100644 --- a/src/messenger/webim/operator/settings.php +++ b/src/messenger/webim/operator/settings.php @@ -41,7 +41,7 @@ if($handle = opendir($stylesfolder)) { $options = array( 'email', 'title', 'logo', 'hosturl', 'usernamepattern', - 'chatstyle', 'chattitle', 'geolink', 'geolinkparams', 'max_connections_from_one_host', 'sendmessagekey'); + 'chatstyle', 'chattitle', 'geolink', 'geolinkparams', 'sendmessagekey'); loadsettings(); $params = array(); @@ -58,7 +58,6 @@ if (isset($_POST['email']) && isset($_POST['title']) && isset($_POST['logo'])) { $params['chattitle'] = getparam('chattitle'); $params['geolink'] = getparam('geolink'); $params['geolinkparams'] = getparam('geolinkparams'); - $params['max_connections_from_one_host'] = trim(getparam('onehostconnections')); $params['sendmessagekey'] = verifyparam('sendmessagekey', "/^c?enter$/"); $params['chatstyle'] = verifyparam("chatstyle","/^\w+$/", $params['chatstyle']); @@ -70,10 +69,6 @@ if (isset($_POST['email']) && isset($_POST['title']) && isset($_POST['logo'])) { $errors[] = getlocal("settings.wrong.email"); } - if(!preg_match("/^\d+$/",$params['max_connections_from_one_host'])) { - $errors[] = getlocal("settings.wrong.onehostconnections"); - } - if($params['geolinkparams']) { foreach(split(",", $params['geolinkparams']) as $oneparam) { if(!preg_match("/^\s*(toolbar|scrollbars|location|status|menubar|width|height|resizable)=\d{1,4}$/", $oneparam)) { @@ -101,7 +96,6 @@ $page['formgeolinkparams'] = topage($params['geolinkparams']); $page['formusernamepattern'] = topage($params['usernamepattern']); $page['formchatstyle'] = $params['chatstyle']; $page['formchattitle'] = topage($params['chattitle']); -$page['formonehostconnections'] = $params['max_connections_from_one_host']; $page['formsendmessagekey'] = $params['sendmessagekey']; $page['availableStyles'] = $stylelist; $page['stored'] = isset($_GET['stored']); diff --git a/src/messenger/webim/view/performance.php b/src/messenger/webim/view/performance.php index 7a8a15b9..810d72e4 100644 --- a/src/messenger/webim/view/performance.php +++ b/src/messenger/webim/view/performance.php @@ -87,6 +87,15 @@ require_once('inc_errors.php');
+
+
+
+ +
+
+
+
+
diff --git a/src/messenger/webim/view/settings.php b/src/messenger/webim/view/settings.php index 14275ce1..4d5288a7 100644 --- a/src/messenger/webim/view/settings.php +++ b/src/messenger/webim/view/settings.php @@ -123,15 +123,6 @@ require_once('inc_errors.php');
-
-
-
- -
-
-
-
-