Ignore:
Timestamp:
05/04/12 10:50:42 (12 years ago)
Author:
marcieli
Message:

Ticket #2690 - Corrigido problema ao remover uma conta compartilhada com expressoCalendar.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/prototype/modules/calendar/interceptors/DBMapping.php

    r6066 r6096  
    759759 
    760760            if (!empty($schedulables)) 
    761                 Controller::deleteALL(array('concept' => 'schedulable'), null, array('filter' => array('IN', 'id', $schedulables))); 
     761                        Controller::deleteALL(array('concept' => 'schedulable'), null, array('filter' => array('IN', 'id', $schedulables))); 
    762762 
    763763            Controller::delete(array('concept' => 'calendar', 'id' => $signature['calendar'])); 
     764                 
     765                $permissions = Controller::find(array('concept' => 'calendarToPermission'), array('id'), array('filter' => array('=', 'calendar', $signature['calendar']))); 
     766 
     767                 
     768                 
     769                if($permissions && count($permissions) > 0){ 
     770                        $ids = array(); 
     771                        foreach($permissions as $key => $value) 
     772                                array_push($ids, $value['id']); 
     773                 
     774                        Controller::deleteALL(array('concept' => 'calendarToPermission'), null, array('filter' => array('IN', 'id', $ids))); 
     775                         
     776                } 
     777                 
     778                 
    764779        } 
    765780    } 
Note: See TracChangeset for help on using the changeset viewer.