fixed problem caused by non existing session-object in setup, reported und the user list

This commit is contained in:
Ralf Becker 2007-07-27 09:36:00 +00:00
parent d899beeb55
commit 9b476e0687

View File

@ -751,7 +751,7 @@ class accounts extends accounts_backend
//echo "<p>accounts::setup_cache() use_session_cache=$this->use_session_cache, is_array(this->cache)=".(int)is_array($this->cache)."</p>\n"; //echo "<p>accounts::setup_cache() use_session_cache=$this->use_session_cache, is_array(this->cache)=".(int)is_array($this->cache)."</p>\n";
if (is_array($this->cache)) return; // cache is already setup if (is_array($this->cache)) return; // cache is already setup
if ($this->use_session_cache && isset($GLOBALS['egw']->accounts) && !is_array($GLOBALS['egw']->accounts->cache)) if ($this->use_session_cache && isset($GLOBALS['egw']->accounts) && !is_array($GLOBALS['egw']->accounts->cache) && is_object($GLOBALS['egw']->session))
{ {
//echo "<p>restoring the session-cache for \$GLOBALS['egw']->accounts</p>\n"; //echo "<p>restoring the session-cache for \$GLOBALS['egw']->accounts</p>\n";
$GLOBALS['egw']->accounts->cache = $GLOBALS['egw']->session->appsession('accounts_cache','phpgwapi'); $GLOBALS['egw']->accounts->cache = $GLOBALS['egw']->session->appsession('accounts_cache','phpgwapi');