mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-02-02 19:39:26 +01:00
reset connectionError Cache on login
This commit is contained in:
parent
dbc96fa181
commit
57c361fd3f
@ -582,19 +582,7 @@ class emailadmin_bo extends so_sql
|
||||
{
|
||||
if (!is_array($_profileID) && is_numeric($_profileID))
|
||||
{
|
||||
//error_log(__METHOD__.__LINE__.' for Profile:'.$_profileID);
|
||||
$buff = egw_cache::getCache(egw_cache::INSTANCE,'email','icServerIMAP_connectionError'.trim($GLOBALS['egw_info']['user']['account_id']));
|
||||
if (isset($buff[$_profileID]))
|
||||
{
|
||||
unset($buff[$_profileID]);
|
||||
egw_cache::setCache(egw_cache::INSTANCE,'email','icServerIMAP_connectionError'.trim($GLOBALS['egw_info']['user']['account_id']),$buff,$expiration=60*15);
|
||||
}
|
||||
$isConError = egw_cache::getCache(egw_cache::INSTANCE,'email','icServerSIEVE_connectionError'.trim($GLOBALS['egw_info']['user']['account_id']));
|
||||
if (isset($isConError[$_profileID]))
|
||||
{
|
||||
unset($isConError[$_profileID]);
|
||||
egw_cache::setCache(egw_cache::INSTANCE,'email','icServerSIEVE_connectionError'.trim($GLOBALS['egw_info']['user']['account_id']),$isConError,$expiration=60*15);
|
||||
}
|
||||
felamimail_bo::resetConnectionErrorCache($_profileID);
|
||||
$structure = egw_cache::getCache(egw_cache::INSTANCE,'email','structureCache'.trim($GLOBALS['egw_info']['user']['account_id']),$callback=null,$callback_params=array(),$expiration=60*60*1);
|
||||
if (isset($structure[$_profileID]))
|
||||
{
|
||||
|
@ -1609,6 +1609,39 @@ class felamimail_bo
|
||||
return $retValue;
|
||||
}
|
||||
|
||||
static function resetConnectionErrorCache($_ImapServerId=null)
|
||||
{
|
||||
//error_log(__METHOD__.__LINE__.' for Profile:'.array2string($_ImapServerId) .' for user:'.trim($GLOBALS['egw_info']['user']['account_id']));
|
||||
$account_id = $GLOBALS['egw_info']['user']['account_id'];
|
||||
if (is_array($_ImapServerId))
|
||||
{
|
||||
// called via hook
|
||||
$account_id = $_ImapServerId['account_id'];
|
||||
unset($_ImapServerId);
|
||||
$_ImapServerId = null;
|
||||
}
|
||||
if (is_null($_ImapServerId))
|
||||
{
|
||||
$buff = array();
|
||||
$isConError = array();
|
||||
}
|
||||
else
|
||||
{
|
||||
$buff = egw_cache::getCache(egw_cache::INSTANCE,'email','icServerIMAP_connectionError'.trim($account_id));
|
||||
if (isset($buff[$_ImapServerId]))
|
||||
{
|
||||
unset($buff[$_ImapServerId]);
|
||||
}
|
||||
$isConError = egw_cache::getCache(egw_cache::INSTANCE,'email','icServerSIEVE_connectionError'.trim($account_id));
|
||||
if (isset($isConError[$_ImapServerId]))
|
||||
{
|
||||
unset($isConError[$_ImapServerId]);
|
||||
}
|
||||
}
|
||||
egw_cache::setCache(egw_cache::INSTANCE,'email','icServerIMAP_connectionError'.trim($account_id),$buff,$expiration=60*15);
|
||||
egw_cache::setCache(egw_cache::INSTANCE,'email','icServerSIEVE_connectionError'.trim($account_id),$isConError,$expiration=60*15);
|
||||
}
|
||||
|
||||
static function resetFolderObjectCache($_ImapServerId=null)
|
||||
{
|
||||
//error_log(__METHOD__.__LINE__.' called for Profile:'.$_ImapServerId.'->'.function_backtrace());
|
||||
|
@ -783,6 +783,7 @@ class uifelamimail
|
||||
|
||||
function viewMainScreen()
|
||||
{
|
||||
if (!$GLOBALS['egw']->hooks->hook_exists('session_creation','felamimail')) $GLOBALS['egw']->hooks->register_single_app_hook('felamimail','session_creation');
|
||||
$connectionReset = false;
|
||||
// get passed messages
|
||||
if (!empty($_GET["msg"])) $message[] = html::purify($_GET["msg"]);
|
||||
|
@ -35,6 +35,7 @@ $setup_info['felamimail']['hooks']['editaccount'] = 'felamimail_hooks::accountHo
|
||||
$setup_info['felamimail']['hooks']['verify_settings'] = 'felamimail_bo::forcePrefReload';
|
||||
$setup_info['felamimail']['hooks']['edit_user'] = 'felamimail_hooks::adminMenu';
|
||||
$setup_info['felamimail']['hooks']['search_link'] = 'felamimail_hooks::search_link';
|
||||
$setup_info['felamimail']['hooks']['session_creation'] = 'felamimail_bo::resetConnectionErrorCache';
|
||||
|
||||
/* Dependencies for this app to work */
|
||||
$setup_info['felamimail']['depends'][] = array(
|
||||
|
Loading…
Reference in New Issue
Block a user