From 0a0261a9e1ddf9614702031e9996733d298b7a4d Mon Sep 17 00:00:00 2001 From: Zone Date: Tue, 24 Sep 2002 05:21:38 +0000 Subject: [PATCH] Make session timeouts configurable --- phpgwapi/setup/default_records.inc.php | 2 ++ phpgwapi/setup/setup.inc.php | 2 +- phpgwapi/setup/tables_update.inc.php | 12 +++++++++++- preferences/templates/default/config.tpl | 13 +++++++++++++ 4 files changed, 27 insertions(+), 2 deletions(-) diff --git a/phpgwapi/setup/default_records.inc.php b/phpgwapi/setup/default_records.inc.php index bd52aa6620..4e626163e1 100644 --- a/phpgwapi/setup/default_records.inc.php +++ b/phpgwapi/setup/default_records.inc.php @@ -150,6 +150,8 @@ $GLOBALS['phpgw_setup']->oProc->query("INSERT INTO phpgw_languages (lang_id, lang_name, available) VALUES ('zu','Zulu','No')"); $GLOBALS['phpgw_setup']->oProc->query("INSERT INTO phpgw_config (config_app, config_name, config_value) VALUES ('phpgwapi','sessions_checkip','True')"); + $GLOBALS['phpgw_setup']->oProc->query("INSERT INTO phpgw_config (config_app, config_name, config_value) VALUES ('phpgwapi','sessions_timeout',7200)"); + $GLOBALS['phpgw_setup']->oProc->query("INSERT INTO phpgw_config (config_app, config_name, config_value) VALUES ('phpgwapi','sessions_app_timeout',86400)"); $GLOBALS['phpgw_setup']->oProc->query("INSERT INTO phpgw_interserv(server_name,server_host,server_url,trust_level,trust_rel,server_mode) VALUES ('phpGW cvsdemo',NULL,'http://www.phpgroupware.org/cvsdemo/xmlrpc.php',99,0,'xmlrpc')"); diff --git a/phpgwapi/setup/setup.inc.php b/phpgwapi/setup/setup.inc.php index a54e675dbe..fed3e5a9a9 100755 --- a/phpgwapi/setup/setup.inc.php +++ b/phpgwapi/setup/setup.inc.php @@ -14,7 +14,7 @@ /* Basic information about this app */ $setup_info['phpgwapi']['name'] = 'phpgwapi'; $setup_info['phpgwapi']['title'] = 'phpgwapi'; - $setup_info['phpgwapi']['version'] = '0.9.15.004'; + $setup_info['phpgwapi']['version'] = '0.9.15.006'; $setup_info['phpgwapi']['versions']['current_header'] = '1.22'; $setup_info['phpgwapi']['enable'] = 3; $setup_info['phpgwapi']['app_order'] = 1; diff --git a/phpgwapi/setup/tables_update.inc.php b/phpgwapi/setup/tables_update.inc.php index 8dd0f0fe37..b5390ce4b3 100644 --- a/phpgwapi/setup/tables_update.inc.php +++ b/phpgwapi/setup/tables_update.inc.php @@ -104,4 +104,14 @@ return $GLOBALS['setup_info']['phpgwapi']['currentver']; } -?> \ No newline at end of file + $test[] = '0.9.15.005'; + function phpgwapi_upgrade0_9_15_005() + { + $GLOBALS['phpgw_setup']->oProc->query("INSERT INTO phpgw_config (config_app, config_name, config_value) VALUES ('phpgwapi','sessions_timeout',7200)"); + $GLOBALS['phpgw_setup']->oProc->query("INSERT INTO phpgw_config (config_app, config_name, config_value) VALUES ('phpgwapi','sessions_app_timeout',86400)"); + + $GLOBALS['setup_info']['phpgwapi']['currentver'] = '0.9.15.006'; + return $GLOBALS['setup_info']['phpgwapi']['currentver']; + } + +?> diff --git a/preferences/templates/default/config.tpl b/preferences/templates/default/config.tpl index 913d7cebc5..e0564dbb89 100644 --- a/preferences/templates/default/config.tpl +++ b/preferences/templates/default/config.tpl @@ -78,6 +78,19 @@ + + + {lang_Timeout_for_sessions_(in_seconds)}. +
{lang_(not_for_php4_sessions)} + + + + + + {lang_Timeout_for_application_session_data_(in_seconds)}. + + +