This will now clear the cache everytime the login page is displayed. This will help to clear the phpgw_info caching when upgrading.

This commit is contained in:
skeeter 2001-11-21 22:13:11 +00:00
parent aa32b065bf
commit 6d642420d9

View File

@ -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;
}