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

Ticket #3239 - Inconsistência na importação de eventos com repetição

Location:
trunk/prototype/modules/calendar/interceptors
Files:
2 edited

Legend:

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

    r6962 r7660  
    233233        } 
    234234        if(isset($params['calendar'])) 
    235         {  
    236             require_once ROOTPATH.'/plugins/icalcreator/iCalUtilityFunctions.class.php'; 
     235        { 
    237236            require_once ROOTPATH.'/plugins/icalcreator/iCalcreator.class.php'; 
    238237             
    239             $vcalendar = new icalCreator( );  
     238            $vcalendar = new vcalendar( ); 
    240239            $vcalendar->parse($data);  
    241240            $vcalendar->sort(); 
  • trunk/prototype/modules/calendar/interceptors/DBMapping.php

    r7655 r7660  
    835835            foreach ($result as $i => $v) { 
    836836 
    837                 $currentTimezone = isset($original['criteria']['timezones'][$v['calendar']]) ? $original['criteria']['timezones'][$v['calendar']] : $v['timezone']; 
     837                $currentTimezone = (isset($v['calendar']) && isset($original['criteria']['timezones'][$v['calendar']])) ? $original['criteria']['timezones'][$v['calendar']] : $v['timezone']; 
    838838 
    839839                $date->setTimestamp((int) ($v['startTime'] / 1000)); 
     
    863863                    $result[$i]['historic'] = Controller::find(array('concept' => 'calendarHistoric'), false, array('filter' => array('=', 'schedulable', $v['id']) , 'deepness' => 2)); 
    864864 
     865                } 
     866 
     867 
     868                if(isset( $v['occurrences'] ) && count( $v['occurrences'] ) > 0){ 
     869 
     870                    foreach( $result[$i]['occurrences'] as &$o){ 
     871 
     872                        $date->setTimestamp((int) ($o / 1000)); 
     873                        $o = ($date->getTimestamp() + $date->getOffset()).'000'; 
     874 
     875                    } 
    865876                } 
    866877 
     
    11071118                "THEN rep.id = occ.repeat_id AND occ.occurrence - al.alarm_offset >= '$target' AND occ.occurrence - al.alarm_offset <= '".( $target + 86400000)."' ". 
    11081119                "ELSE (co.range_start - al.alarm_offset) >= '$target' AND (co.range_start - al.alarm_offset) <= '".( $target + 86400000)."' END"); 
    1109              
     1120 
    11101121            if(is_array($al)) 
    11111122              foreach( $al as $v ) 
    11121123                $params[] = array('schedulable' =>  $v); 
    1113                
     1124 
    11141125            else 
    11151126              $params = false; 
    1116   
     1127 
    11171128            return false; 
    11181129        } 
Note: See TracChangeset for help on using the changeset viewer.