Changeset 7219


Ignore:
Timestamp:
09/14/12 11:16:17 (7 years ago)
Author:
angelo
Message:

Ticket #3103 - Inconsistencia com a sincronizacao com davical

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/prototype/services/iCal.php

    r7218 r7219  
    20052005 
    20062006    static private function _existInMyCalendars($id, $owner) { 
    2007         $sig = Controller::find(array('concept' => 'calendarSignature'), array('user', 'calendar', 'isOwner'), array('filter' =>  array('=', 'user', $owner))); 
     2007        $sig = Controller::find(array('concept' => 'calendarSignature'), array('user', 'calendar', 'isOwner'), array('filter' => array('AND', array('=', 'isOwner', '1'), array('=', 'user', $owner)))); 
     2008        $sig2 = Controller::find(array('concept' => 'calendarToPermission'), array('calendar'), array('filter' => array('AND', array('*', 'acl', 'w'), array('=', 'user', $owner)))); 
     2009 
    20082010        $calendars = array(); 
    2009         foreach ($sig as $val) 
    2010             $calendars[] = $val['calendar']; 
     2011        if(is_array($sig)) 
     2012                foreach ($sig as $val) 
     2013                    $calendars[] = $val['calendar']; 
     2014        if(is_array($sig2)) 
     2015                foreach ($sig2 as $val) 
     2016                    $calendars[] = $val['calendar']; 
     2017 
    20112018 
    20122019        $return = Controller::find(array('concept' => 'calendarToSchedulable'), null, array('filter' => array('AND', array('IN', 'calendar', $calendars), array('=', 'schedulable', $id)))); 
Note: See TracChangeset for help on using the changeset viewer.