Ignore:
Timestamp:
01/24/12 17:22:37 (12 years ago)
Author:
cristiano
Message:

Ticket #2434 - Correções no importar ical

Location:
trunk/prototype/modules/calendar
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/prototype/modules/calendar/constants.php

    r5341 r5415  
    2323define('CLASS_CONFIDENTIAL', 3); 
    2424 
     25 
     26define('ICAL_ACTION_IMPORT', 1); 
     27define('ICAL_ACTION_UPDATE', 2); 
     28define('ICAL_ACTION_DELETE', 3); 
     29define('ICAL_ACTION_NONE', 4); 
     30define('ICAL_ACTION_REPLY', 5); 
     31 
    2532?> 
  • trunk/prototype/modules/calendar/interceptors/DBMapping.php

    r5399 r5415  
    2424                                         'lastUpdate' => 'last_update', 
    2525                                         'dtstamp' => 'dtstamp', 
     26                                         'sequence' => 'sequence', 
    2627                                         'timezone' => 'tzid'); 
    2728       
     
    287288 
    288289    public function encodeUpdateSchedulable( &$uri , &$params , &$criteria , $original ){        
    289         if(isset($params['rangeStart'])) 
     290        if(isset($params['startTime'])) 
    290291                $params['rangeStart'] = gmdate( 'd-m-Y' , (int)($params['startTime'] / 1000) ); 
    291         if(isset($params['rangeEnd'])) 
     292        if(isset($params['endTime'])) 
    292293                $params['rangeEnd'] = gmdate( 'd-m-Y' , (int)($params['endTime'] / 1000) );        
    293294         
     
    679680        $newCriteria = $original['criteria']; 
    680681        $valid = true; 
    681         self::validExternalUserCriteria($newCriteria, self::$calendar_ex_participantMap, $valid); 
     682        self::validExternalUserCriteria($newCriteria['filter'], self::$calendar_ex_participantMap, $valid); 
    682683        if($valid == true) 
    683684        { 
     
    979980        if (!is_array($filter) || count($filter) <= 0) 
    980981            return null; 
    981  
     982         
    982983        $op = array_shift($filter); 
    983984 
     
    985986            foreach ($filter as $i => $f) 
    986987                $filter[$i] = self::validExternalUserCriteria($f, $map ,$findCalendar ); 
    987         } 
    988         else 
    989         { 
     988        } 
     989        else 
     990        {            
    990991           if( isset($filter[0]) && !in_array($filter[0] , self::$calendar_ex_participantMap)) 
    991992             $ref = false; 
     
    994995                $filter[0] = isset($map[$filter[0]]) ? $map[$filter[0]] : $filter[0]; 
    995996        } 
    996  
    997         array_unshift($filter, $op); 
    998  
     997         
    999998        return( $filter ); 
    1000999    } 
  • trunk/prototype/modules/calendar/js/calendar.codecs.js

    r5409 r5415  
    415415                                         
    416416                                        if( attend.user.id ===  me.id ){ 
    417                                             participantInfo = { 
     417                                            participantInfo.user = { 
    418418                                                        status : attend.status, 
    419419                                                        alarms : $.map(attend.alarms || [], function( alarm ){ 
     
    422422                                                }; 
    423423                                                me.id = attend.id; 
     424                                                return(null); 
    424425                                        }; 
    425426                                         
     
    433434                                        if( !!parseInt(attend.isOrganizer )){ 
    434435                                                isOrganizer = ((attend.user.id == User.me.id) || (!!!attend.user)) ? 1 : 0; 
    435                                             participantInfo.organizer = person; 
     436                                            participantInfo.organizer = DataLayer.copy(person); 
    436437                                                return(null); 
    437438                                        };                                       
     
    440441                                }), 
    441442                            organizer: participantInfo.organizer || me, 
    442                             alarms: participantInfo.alarms || [], 
    443                             status: participantInfo.status || 1, 
     443                            alarms: !!participantInfo.user ?  participantInfo.user.alarms : [], 
     444                            status: !!participantInfo.user ? participantInfo.user.status : 1, 
    444445                            me: me, 
    445446                                isOrganizer: isOrganizer, 
Note: See TracChangeset for help on using the changeset viewer.