calling invalidate_session_cache only if it exists (setup does not have/need it)

This commit is contained in:
Ralf Becker 2005-11-24 20:08:09 +00:00
parent 8d5b6eef7a
commit d8932b3ad3
3 changed files with 13 additions and 7 deletions

View File

@ -243,7 +243,8 @@
),false,__LINE__,__FILE__);
}
}
if ($this->account_id == $GLOBALS['egw_info']['user']['account_id'])
if ($this->account_id == $GLOBALS['egw_info']['user']['account_id'] &&
method_exists($GLOBALS['egw'],'invalidate_session_cache')) // egw object in setup is limited
{
$GLOBALS['egw']->invalidate_session_cache();
}
@ -386,7 +387,8 @@
'acl_account' => $account_id,
),__LINE__,__FILE__);
if ($account_id == $GLOBALS['egw_info']['user']['account_id'])
if ($account_id == $GLOBALS['egw_info']['user']['account_id'] &&
method_exists($GLOBALS['egw'],'invalidate_session_cache')) // egw object in setup is limited
{
$GLOBALS['egw']->invalidate_session_cache();
}
@ -420,8 +422,10 @@
$where['acl_account'] = $cache_accountid[$accountid] = get_account_id($accountid,$this->account_id);
}
}
$GLOBALS['egw']->invalidate_session_cache();
if (method_exists($GLOBALS['egw'],'invalidate_session_cache')) // egw object in setup is limited
{
$GLOBALS['egw']->invalidate_session_cache();
}
if ($app == '%' || $app == '%%') unset($where['acl_appname']);
$this->db->delete($this->table_name,$where,__LINE__,__FILE__);

View File

@ -94,7 +94,7 @@
}
$this->db->unlock();
if ($this->appname == 'phpgwapi')
if ($this->appname == 'phpgwapi' && method_exists($GLOBALS['egw'],'invalidate_session_cache')) // egw object in setup is limited
{
$GLOBALS['egw']->invalidate_session_cache(); // in case egw_info is cached in the session (phpgwapi is in egw_info[server])
}

View File

@ -602,8 +602,10 @@
$GLOBALS['egw_info']['user']['preferences'] = $this->data;
$GLOBALS['egw']->session->save_repositories();
}
$GLOBALS['egw']->invalidate_session_cache(); // in case with cache the egw_info array in the session
if (method_exists($GLOBALS['egw'],'invalidate_session_cache')) // egw object in setup is limited
{
$GLOBALS['egw']->invalidate_session_cache(); // in case with cache the egw_info array in the session
}
return $this->data;
}