Changeset 8203


Ignore:
Timestamp:
08/27/13 10:26:00 (10 years ago)
Author:
cristiano
Message:

Ticket #3915 - Não remoção de assinaturas de agendas ao excluir usuário

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/expressoAdmin1_2/inc/class.db_functions.inc.php

    r7769 r8203  
    539539        { 
    540540                // AGENDA 
    541                 $this->db->query('SELECT cal_id FROM phpgw_cal WHERE owner ='.$user_info['uidnumber']); 
     541                $this->db->query('SELECT calendar_id FROM calendar_signature WHERE user_uidnumber ='.$user_info['uidnumber'] . ' AND is_owner = 1' ); 
    542542                while($this->db->next_record()) 
    543543                { 
    544544                        $ids[] = $this->db->row(); 
    545545                } 
     546 
    546547                if (count($ids)) 
    547548                { 
    548549                        foreach($ids as $i => $id) 
    549                         { 
    550                                 $this->db->query('DELETE FROM phpgw_cal WHERE cal_id='.$id['cal_id']); 
    551                                 $this->db->query('DELETE FROM phpgw_cal_user WHERE cal_id='.$id['cal_id']); 
    552                                 $this->db->query('DELETE FROM phpgw_cal_repeats WHERE cal_id='.$id['cal_id']); 
    553                                 $this->db->query('DELETE FROM phpgw_cal_extra WHERE cal_id='.$id['cal_id']); 
    554                         } 
     550            { 
     551                $this->db->query('DELETE FROM calendar_signature WHERE calendar_id ='.$id['calendar_id']); 
     552                $this->db->query('DELETE FROM calendar_permission WHERE object_id ='.$id['calendar_id']. ' AND object_type = 0'); 
     553            } 
    555554                } 
    556555                 
Note: See TracChangeset for help on using the changeset viewer.