Changeset 7660 for trunk/prototype/services/iCal.php
- Timestamp:
- 12/17/12 14:22:24 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/prototype/services/iCal.php
r7579 r7660 1 1 <?php 2 2 3 require_once ROOTPATH . '/plugins/icalcreator/iCalUtilityFunctions.class.php';3 //require_once ROOTPATH . '/plugins/icalcreator/iCalUtilityFunctions.class.php'; 4 4 require_once ROOTPATH . '/plugins/icalcreator/iCalcreator.class.php'; 5 5 require_once ROOTPATH . '/modules/calendar/constants.php'; … … 31 31 protected function createIcal($data, $params = false ) 32 32 { 33 $ical = new icalCreator();33 $ical = new vcalendar(); 34 34 $ical->setProperty('method', isset($params['method']) ? $params['method'] : 'PUBLISH' ); 35 35 … … 136 136 $date = $r->next(); 137 137 138 $timezone = &$ical->newComponent('vtimezone');138 $timezone = $ical->newComponent('vtimezone'); 139 139 $timezone->setProperty('tzid',$apTimezone ); 140 140 141 $standard = &$timezone->newComponent( "standard" );141 $standard = $timezone->newComponent( "standard" ); 142 142 $standard->setProperty( "tzoffsetfrom", $timezoneDayligth['standardFrom'] ); 143 143 $standard->setProperty( "tzoffsetto", $timezoneDayligth['standardTo'] ); … … 154 154 $standard->setProperty('rrule', $rrule); 155 155 156 $daylight = &$timezone->newComponent( "daylight" );156 $daylight = $timezone->newComponent( "daylight" ); 157 157 158 158 $daylight->setProperty( "tzoffsetfrom", $timezoneDayligth['daylightFrom'] ); … … 261 261 protected function createCompatibleIcal($data, $params = false ) 262 262 { 263 $ical = new icalCreator();263 $ical = new vcalendar(); 264 264 $ical->setProperty('method', isset($params['method']) ? $params['method'] : 'PUBLISH' ); 265 265 … … 527 527 public function parse($data, $params = false) { 528 528 Config::regSet('noAlarm', TRUE); //Evita o envio de notificação 529 $vcalendar = new icalCreator( );529 $vcalendar = new vcalendar( ); 530 530 $vcalendar->parse(trim($data)); 531 531 $vcalendar->sort(); … … 1168 1168 1169 1169 public function analize($data, $params = false) { 1170 $vcalendar = new icalCreator( );1170 $vcalendar = new vcalendar( ); 1171 1171 $vcalendar->parse(trim($data)); 1172 1172 $vcalendar->sort(); … … 1611 1611 $repeat = array(); 1612 1612 $repeat['schedulable'] = $eventID; 1613 foreach ($rrule as $i => $v) { 1613 $repeat['startTime'] = $schedulable['startTime']; 1614 foreach ($rrule as $i => $v) { 1614 1615 if (strtolower($i) == 'freq') 1615 1616 $repeat['frequency'] = $v; 1616 1617 else if (strtolower($i) == 'until') 1617 $repeat['endTime'] = $v; 1618 { 1619 $repeat['endTime'] = strtotime($v['year'].'-'.$v['month'].'-'.$v['day'].' '.$v['hour'].':'.$v['min'].':'.$v['sec'].' '.$v['tz']) .'000' ; 1620 } 1618 1621 else 1619 1622 $repeat[strtolower($i)] = $v; … … 1622 1625 $interation['repeat://' . $repeatID] = $repeat; 1623 1626 } 1624 1625 1627 1626 1628 $schedulable['calendar'] = $params['calendar'];
Note: See TracChangeset
for help on using the changeset viewer.