From 6d642420d9c100cee2aadf862b680137918c9155 Mon Sep 17 00:00:00 2001 From: skeeter Date: Wed, 21 Nov 2001 22:13:11 +0000 Subject: [PATCH] This will now clear the cache everytime the login page is displayed. This will help to clear the phpgw_info caching when upgrading. --- setup/index.php | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/setup/index.php b/setup/index.php index acfbe9f9a7..72f767a641 100644 --- a/setup/index.php +++ b/setup/index.php @@ -60,6 +60,21 @@ $phpgw_setup->show_header(lang('Please login'),True); $phpgw_setup->login_form(); $phpgw_setup->show_footer(); + + /* Add cleaning of app_sessions per skeeter, but with a check for the table being there, just in case */ + $tablenames = $phpgw_setup->db->table_names(); + while(list($key,$val) = @each($tablenames)) + { + $tables[] = $val['table_name']; + } + if ($phpgw_setup->isinarray('phpgw_app_sessions',$tables)) + { + $phpgw_setup->db->lock(array('phpgw_app_sessions')); + @$phpgw_setup->db->query("DELETE FROM phpgw_app_sessions WHERE sessionid = '0' and loginid = '0' and app = 'phpgwapi' and location = 'config'",__LINE__,__FILE__); + @$phpgw_setup->db->query("DELETE FROM phpgw_app_sessions WHERE app = 'phpgwapi' and location = 'phpgw_info_cache'",__LINE__,__FILE__); + $phpgw_setup->db->unlock(); + } + exit; }