fix for bug [ 1357995 ] LDAP account import errors

This commit is contained in:
Ralf Becker 2005-11-20 08:03:06 +00:00
parent 1549913fd7
commit 2dbaf992fa
3 changed files with 21 additions and 4 deletions

View File

@ -374,7 +374,10 @@
//echo "<p>accounts::cache_invalidate($account_id)</p>\n"; //echo "<p>accounts::cache_invalidate($account_id)</p>\n";
$GLOBALS['egw_info']['accounts']['cache'] = array(); $GLOBALS['egw_info']['accounts']['cache'] = array();
$GLOBALS['egw']->invalidate_session_cache(); // invalidates whole egw-enviroment if stored in the session if (method_exists($GLOBALS['egw'],'invalidate_session_cache')) // egw object in setup is limited
{
$GLOBALS['egw']->invalidate_session_cache(); // invalidates whole egw-enviroment if stored in the session
}
} }
/** /**

View File

@ -34,11 +34,18 @@
var $account_id; var $account_id;
var $data; var $data;
var $total; var $total;
var $table = 'egw_accounts';
function accounts_() function accounts_()
{ {
$this->db = clone($GLOBALS['egw']->db); if (is_object($GLOBALS['egw_setup']))
$this->table = 'egw_accounts'; {
$this->db = clone($GLOBALS['egw_setup']->db);
}
else
{
$this->db = clone($GLOBALS['egw']->db);
}
$this->db->set_app('phpgwapi'); // to load the right table-definitions for insert, select, update, ... $this->db->set_app('phpgwapi'); // to load the right table-definitions for insert, select, update, ...
} }

View File

@ -50,7 +50,14 @@
*/ */
function applications($account_id = '') function applications($account_id = '')
{ {
$this->db = clone($GLOBALS['egw']->db); if (is_object($GLOBALS['egw_setup']))
{
$this->db = clone($GLOBALS['egw_setup']->db);
}
else
{
$this->db = clone($GLOBALS['egw']->db);
}
$this->db->set_app('phpgwapi'); $this->db->set_app('phpgwapi');
$this->account_id = get_account_id($account_id); $this->account_id = get_account_id($account_id);