forked from extern/egroupware
fixed not working delete-account hook
This commit is contained in:
parent
3d20422177
commit
55b0081103
@ -793,7 +793,7 @@ class addressbook_so
|
|||||||
{
|
{
|
||||||
$this->somain->delete(array('owner' => $account_id)); // so_sql_cf::delete() takes care of cfs too
|
$this->somain->delete(array('owner' => $account_id)); // so_sql_cf::delete() takes care of cfs too
|
||||||
|
|
||||||
if(!($this->somain instanceof addressbook_sql))
|
if(method_exists($this->somain, 'get_lists'))
|
||||||
{
|
{
|
||||||
$lists = $this->somain->get_lists($account_id);
|
$lists = $this->somain->get_lists($account_id);
|
||||||
$this->somain->delete_list(array_keys($lists));
|
$this->somain->delete_list(array_keys($lists));
|
||||||
|
@ -54,6 +54,8 @@ class addressbook_sql extends so_sql_cf
|
|||||||
*/
|
*/
|
||||||
var $ab2list_table = 'egw_addressbook2list';
|
var $ab2list_table = 'egw_addressbook2list';
|
||||||
|
|
||||||
|
const EXTRA_TABLE = 'egw_addressbook_extra';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor
|
* Constructor
|
||||||
*
|
*
|
||||||
@ -61,7 +63,7 @@ class addressbook_sql extends so_sql_cf
|
|||||||
*/
|
*/
|
||||||
function __construct(egw_db $db=null)
|
function __construct(egw_db $db=null)
|
||||||
{
|
{
|
||||||
parent::__construct('phpgwapi','egw_addressbook','egw_addressbook_extra','contact_',
|
parent::__construct('phpgwapi', 'egw_addressbook', self::EXTRA_TABLE, 'contact_',
|
||||||
$extra_key='_name',$extra_value='_value',$extra_id='_id',$db);
|
$extra_key='_name',$extra_value='_value',$extra_id='_id',$db);
|
||||||
|
|
||||||
// Get custom fields from addressbook instead of phpgwapi
|
// Get custom fields from addressbook instead of phpgwapi
|
||||||
@ -473,11 +475,11 @@ class addressbook_sql extends so_sql_cf
|
|||||||
),__LINE__,__FILE__);
|
),__LINE__,__FILE__);
|
||||||
|
|
||||||
// cfs
|
// cfs
|
||||||
$this->db->update($this->soextra->table_name,array(
|
$this->db->update(self::EXTRA_TABLE, array(
|
||||||
$this->extra_owner => $new_owner
|
'contact_owner' => $new_owner
|
||||||
),array(
|
),array(
|
||||||
$this->extra_owner => $account_id
|
'contact_owner' => $account_id
|
||||||
),__LINE__,__FILE__);
|
), __LINE__, __FILE__);
|
||||||
|
|
||||||
// lists
|
// lists
|
||||||
$this->db->update($this->lists_table, array(
|
$this->db->update($this->lists_table, array(
|
||||||
|
Loading…
Reference in New Issue
Block a user