diff --git a/ajax/event/edit.form.php b/ajax/event/edit.form.php index 24f7d08d..ecba697c 100644 --- a/ajax/event/edit.form.php +++ b/ajax/event/edit.form.php @@ -27,7 +27,7 @@ $vevent = $object->VEVENT; $dtstart = $vevent->DTSTART; $dtend = OC_Calendar_Object::getDTEndFromVEvent($vevent); switch($dtstart->getDateType()) { - case Sabre_VObject_Property_DateTime::UTC: + case Sabre\VObject\Property\DateTime::UTC: $timeOffset = $_SESSION['timezone']*60; $newDT = $dtstart->getDateTime(); $newDT->add(new DateInterval("PT" . $timeOffset . "M")); @@ -35,15 +35,15 @@ switch($dtstart->getDateType()) { $newDT = $dtend->getDateTime(); $newDT->add(new DateInterval("PT" . $timeOffset . "M")); $dtend->setDateTime($newDT); - case Sabre_VObject_Property_DateTime::LOCALTZ: - case Sabre_VObject_Property_DateTime::LOCAL: + case Sabre\VObject\Property\DateTime::LOCALTZ: + case Sabre\VObject\Property\DateTime::LOCAL: $startdate = $dtstart->getDateTime()->format('d-m-Y'); $starttime = $dtstart->getDateTime()->format('H:i'); $enddate = $dtend->getDateTime()->format('d-m-Y'); $endtime = $dtend->getDateTime()->format('H:i'); $allday = false; break; - case Sabre_VObject_Property_DateTime::DATE: + case Sabre\VObject\Property\DateTime::DATE: $startdate = $dtstart->getDateTime()->format('d-m-Y'); $starttime = ''; $dtend->getDateTime()->modify('-1 day'); diff --git a/ajax/event/move.php b/ajax/event/move.php index 2ba6d7f1..646814f9 100644 --- a/ajax/event/move.php +++ b/ajax/event/move.php @@ -24,19 +24,19 @@ $dtstart = $vevent->DTSTART; $dtend = OC_Calendar_Object::getDTEndFromVEvent($vevent); $start_type = $dtstart->getDateType(); $end_type = $dtend->getDateType(); -if ($allday && $start_type != Sabre_VObject_Property_DateTime::DATE) { - $start_type = $end_type = Sabre_VObject_Property_DateTime::DATE; +if ($allday && $start_type != Sabre\VObject\Property\DateTime::DATE) { + $start_type = $end_type = Sabre\VObject\Property\DateTime::DATE; $dtend->setDateTime($dtend->getDateTime()->modify('+1 day'), $end_type); } -if (!$allday && $start_type == Sabre_VObject_Property_DateTime::DATE) { - $start_type = $end_type = Sabre_VObject_Property_DateTime::LOCALTZ; +if (!$allday && $start_type == Sabre\VObject\Property\DateTime::DATE) { + $start_type = $end_type = Sabre\VObject\Property\DateTime::LOCALTZ; } $dtstart->setDateTime($dtstart->getDateTime()->add($delta), $start_type); $dtend->setDateTime($dtend->getDateTime()->add($delta), $end_type); unset($vevent->DURATION); -$vevent->setDateTime('LAST-MODIFIED', 'now', Sabre_VObject_Property_DateTime::UTC); -$vevent->setDateTime('DTSTAMP', 'now', Sabre_VObject_Property_DateTime::UTC); +$vevent->setDateTime('LAST-MODIFIED', 'now', Sabre\VObject\Property\DateTime::UTC); +$vevent->setDateTime('DTSTAMP', 'now', Sabre\VObject\Property\DateTime::UTC); try { OC_Calendar_Object::edit($id, $vcalendar->serialize()); diff --git a/ajax/event/resize.php b/ajax/event/resize.php index 46328c30..dcc0c7ed 100644 --- a/ajax/event/resize.php +++ b/ajax/event/resize.php @@ -31,8 +31,8 @@ $end_type = $dtend->getDateType(); $dtend->setDateTime($dtend->getDateTime()->add($delta), $end_type); unset($vevent->DURATION); -$vevent->setDateTime('LAST-MODIFIED', 'now', Sabre_VObject_Property_DateTime::UTC); -$vevent->setDateTime('DTSTAMP', 'now', Sabre_VObject_Property_DateTime::UTC); +$vevent->setDateTime('LAST-MODIFIED', 'now', Sabre\VObject\Property\DateTime::UTC); +$vevent->setDateTime('DTSTAMP', 'now', Sabre\VObject\Property\DateTime::UTC); OC_Calendar_Object::edit($id, $vcalendar->serialize()); $lastmodified = $vevent->__get('LAST-MODIFIED')->getDateTime(); diff --git a/lib/app.php b/lib/app.php index ab6fae78..5bd8e83c 100644 --- a/lib/app.php +++ b/lib/app.php @@ -378,7 +378,7 @@ class OC_Calendar_App{ $vevent = $object->VEVENT; $return = array(); $id = $event['id']; - $allday = ($vevent->DTSTART->getDateType() == Sabre_VObject_Element_DateTime::DATE)?true:false; + $allday = ($vevent->DTSTART->getDateType() == Sabre\VObject\Property\DateTime::DATE)?true:false; $last_modified = @$vevent->__get('LAST-MODIFIED'); $lastmodified = ($last_modified)?$last_modified->getDateTime()->format('U'):0; $staticoutput = array('id'=>(int)$event['id'], @@ -410,7 +410,7 @@ class OC_Calendar_App{ $object->expand($start, $end); } foreach($object->getComponents() as $singleevent) { - if(!($singleevent instanceof Sabre_VObject_Component_VEvent)) { + if(!($singleevent instanceof Sabre\VObject\Component\VEvent)) { continue; } $dynamicoutput = OC_Calendar_Object::generateStartEndDate($singleevent->DTSTART, OC_Calendar_Object::getDTEndFromVEvent($singleevent), $allday, self::$tz); diff --git a/lib/export.php b/lib/export.php index d8b919a8..96787709 100644 --- a/lib/export.php +++ b/lib/export.php @@ -74,11 +74,11 @@ class OC_Calendar_Export{ $start_dt = $dtstart->getDateTime(); $dtend = OC_Calendar_Object::getDTEndFromVEvent($object->VEVENT); $end_dt = $dtend->getDateTime(); - if($dtstart->getDateType() !== Sabre_VObject_Element_DateTime::DATE) { + if($dtstart->getDateType() !== Sabre\VObject\Element\DateTime::DATE) { $start_dt->setTimezone(new DateTimeZone('UTC')); $end_dt->setTimezone(new DateTimeZone('UTC')); - $object->VEVENT->setDateTime('DTSTART', $start_dt, Sabre_VObject_Property_DateTime::UTC); - $object->VEVENT->setDateTime('DTEND', $end_dt, Sabre_VObject_Property_DateTime::UTC); + $object->VEVENT->setDateTime('DTSTART', $start_dt, Sabre\VObject\Property\DateTime::UTC); + $object->VEVENT->setDateTime('DTEND', $end_dt, Sabre\VObject\Property\DateTime::UTC); } return $object->VEVENT->serialize(); } diff --git a/lib/import.php b/lib/import.php index a62c0152..b9a5fd01 100644 --- a/lib/import.php +++ b/lib/import.php @@ -20,7 +20,7 @@ class OC_Calendar_Import{ private $cacheprogress; /* - * @brief Sabre_VObject_Component_VCalendar object - for documentation see http://code.google.com/p/sabredav/wiki/Sabre_VObject_Component_VCalendar + * @brief Sabre\VObject\Component\VCalendar object - for documentation see http://code.google.com/p/sabredav/wiki/Sabre_VObject_Component_VCalendar */ private $calobject; @@ -108,7 +108,7 @@ class OC_Calendar_Import{ } $numofcomponents = count($this->calobject->getComponents()); foreach($this->calobject->getComponents() as $object) { - if(!($object instanceof Sabre_VObject_Component_VEvent) && !($object instanceof Sabre_VObject_Component_VJournal) && !($object instanceof Sabre_VObject_Component_VTodo)) { + if(!($object instanceof Sabre\VObject\Component\VEvent) && !($object instanceof Sabre\VObject\Component\VJournal) && !($object instanceof Sabre\VObject\Component\VTodo)) { continue; } $dtend = OC_Calendar_Object::getDTEndFromVEvent($object); diff --git a/lib/object.php b/lib/object.php index 3ad8dcb2..db654e80 100644 --- a/lib/object.php +++ b/lib/object.php @@ -754,7 +754,7 @@ class OC_Calendar_Object{ $vevent = new OC_VObject('VEVENT'); $vcalendar->add($vevent); - $vevent->setDateTime('CREATED', 'now', Sabre_VObject_Property_DateTime::UTC); + $vevent->setDateTime('CREATED', 'now', Sabre\VObject\Property\DateTime::UTC); $vevent->setUID(); return self::updateVCalendarFromRequest($request, $vcalendar); @@ -923,22 +923,22 @@ class OC_Calendar_Object{ } - $vevent->setDateTime('LAST-MODIFIED', 'now', Sabre_VObject_Property_DateTime::UTC); - $vevent->setDateTime('DTSTAMP', 'now', Sabre_VObject_Property_DateTime::UTC); + $vevent->setDateTime('LAST-MODIFIED', 'now', Sabre\VObject\Property\DateTime::UTC); + $vevent->setDateTime('DTSTAMP', 'now', Sabre\VObject\Property\DateTime::UTC); $vevent->setString('SUMMARY', $title); if($allday) { $start = new DateTime($from); $end = new DateTime($to.' +1 day'); - $vevent->setDateTime('DTSTART', $start, Sabre_VObject_Property_DateTime::DATE); - $vevent->setDateTime('DTEND', $end, Sabre_VObject_Property_DateTime::DATE); + $vevent->setDateTime('DTSTART', $start, Sabre\VObject\Property\DateTime::DATE); + $vevent->setDateTime('DTEND', $end, Sabre\VObject\Property\DateTime::DATE); }else{ $timezone = OC_Calendar_App::getTimezone(); $timezone = new DateTimeZone($timezone); $start = new DateTime($from.' '.$fromtime, $timezone); $end = new DateTime($to.' '.$totime, $timezone); - $vevent->setDateTime('DTSTART', $start, Sabre_VObject_Property_DateTime::LOCALTZ); - $vevent->setDateTime('DTEND', $end, Sabre_VObject_Property_DateTime::LOCALTZ); + $vevent->setDateTime('DTSTART', $start, Sabre\VObject\Property\DateTime::LOCALTZ); + $vevent->setDateTime('DTEND', $end, Sabre\VObject\Property\DateTime::LOCALTZ); } unset($vevent->DURATION); diff --git a/lib/repeat.php b/lib/repeat.php index 641b1576..a613697d 100644 --- a/lib/repeat.php +++ b/lib/repeat.php @@ -95,10 +95,10 @@ class OC_Calendar_Repeat{ $end->modify('+5 years'); $object->expand($start, $end); foreach($object->getComponents() as $vevent) { - if(!($vevent instanceof Sabre_VObject_Component_VEvent)) { + if(!($vevent instanceof Sabre\VObject\Component\VEvent)) { continue; } - $startenddate = OC_Calendar_Object::generateStartEndDate($vevent->DTSTART, OC_Calendar_Object::getDTEndFromVEvent($vevent), ($vevent->DTSTART->getDateType() == Sabre_VObject_Element_DateTime::DATE)?true:false, 'UTC'); + $startenddate = OC_Calendar_Object::generateStartEndDate($vevent->DTSTART, OC_Calendar_Object::getDTEndFromVEvent($vevent), ($vevent->DTSTART->getDateType() == Sabre\VObject\Property\DateTime::DATE)?true:false, 'UTC'); $stmt = OCP\DB::prepare('INSERT INTO `*PREFIX*calendar_repeat` (`eventid`,`calid`,`startdate`,`enddate`) VALUES(?,?,?,?)'); $stmt->execute(array($id,OC_Calendar_Object::getCalendarid($id),$startenddate['start'],$startenddate['end'])); } diff --git a/lib/search.php b/lib/search.php index 5d313aec..4fda70a1 100644 --- a/lib/search.php +++ b/lib/search.php @@ -29,7 +29,7 @@ class OC_Search_Provider_Calendar extends OC_Search_Provider{ $start_dt->setTimezone(new DateTimeZone($user_timezone)); $end_dt = $dtend->getDateTime(); $end_dt->setTimezone(new DateTimeZone($user_timezone)); - if ($dtstart->getDateType() == Sabre_VObject_Property_DateTime::DATE) { + if ($dtstart->getDateType() == Sabre\VObject\Property\DateTime::DATE) { $end_dt->modify('-1 sec'); if($start_dt->format('d.m.Y') != $end_dt->format('d.m.Y')) { $info = $l->t('Date') . ': ' . $start_dt->format('d.m.Y') . ' - ' . $end_dt->format('d.m.Y');