aboutsummaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorGeorg Ehrke <dev@georgswebsite.de>2012-02-24 22:20:40 +0100
committerGeorg Ehrke <dev@georgswebsite.de>2012-02-24 22:20:40 +0100
commit1d1dfcbc1a528314b39322d0b8145e05072cd5ff (patch)
treea504e3652ac74638ad0fe4cb5acef95fd7a12206 /apps
parente082d473bb856bdaf48290199bf5d2f1fb4a435d (diff)
downloadnextcloud-server-1d1dfcbc1a528314b39322d0b8145e05072cd5ff.tar.gz
nextcloud-server-1d1dfcbc1a528314b39322d0b8145e05072cd5ff.zip
replace Sabre_VObject_Element_DateTime with Sabre_VObject_Property_DateTime
Diffstat (limited to 'apps')
-rw-r--r--apps/calendar/ajax/event/edit.form.php6
-rw-r--r--apps/calendar/ajax/event/move.php12
-rw-r--r--apps/calendar/ajax/event/resize.php4
-rwxr-xr-xapps/calendar/ajax/events.php2
-rw-r--r--apps/calendar/lib/object.php18
-rw-r--r--apps/calendar/lib/search.php2
6 files changed, 22 insertions, 22 deletions
diff --git a/apps/calendar/ajax/event/edit.form.php b/apps/calendar/ajax/event/edit.form.php
index 837edbbbf05..7371577dcfe 100644
--- a/apps/calendar/ajax/event/edit.form.php
+++ b/apps/calendar/ajax/event/edit.form.php
@@ -21,15 +21,15 @@ $vevent = $object->VEVENT;
$dtstart = $vevent->DTSTART;
$dtend = OC_Calendar_Object::getDTEndFromVEvent($vevent);
switch($dtstart->getDateType()) {
- case Sabre_VObject_Element_DateTime::LOCALTZ:
- case Sabre_VObject_Element_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_Element_DateTime::DATE:
+ case Sabre_VObject_Property_DateTime::DATE:
$startdate = $dtstart->getDateTime()->format('d-m-Y');
$starttime = '';
$dtend->getDateTime()->modify('-1 day');
diff --git a/apps/calendar/ajax/event/move.php b/apps/calendar/ajax/event/move.php
index 8150fdbaa32..37420e2a876 100644
--- a/apps/calendar/ajax/event/move.php
+++ b/apps/calendar/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_Element_DateTime::DATE){
- $start_type = $end_type = Sabre_VObject_Element_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_Element_DateTime::DATE){
- $start_type = $end_type = Sabre_VObject_Element_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_Element_DateTime::UTC);
-$vevent->setDateTime('DTSTAMP', 'now', Sabre_VObject_Element_DateTime::UTC);
+$vevent->setDateTime('LAST-MODIFIED', 'now', Sabre_VObject_Property_DateTime::UTC);
+$vevent->setDateTime('DTSTAMP', 'now', Sabre_VObject_Property_DateTime::UTC);
$result = OC_Calendar_Object::edit($id, $vcalendar->serialize());
$lastmodified = $vevent->__get('LAST-MODIFIED')->getDateTime();
diff --git a/apps/calendar/ajax/event/resize.php b/apps/calendar/ajax/event/resize.php
index aa2d420e77d..a8d8f49ae0a 100644
--- a/apps/calendar/ajax/event/resize.php
+++ b/apps/calendar/ajax/event/resize.php
@@ -24,8 +24,8 @@ $end_type = $dtend->getDateType();
$dtend->setDateTime($dtend->getDateTime()->add($delta), $end_type);
unset($vevent->DURATION);
-$vevent->setDateTime('LAST-MODIFIED', 'now', Sabre_VObject_Element_DateTime::UTC);
-$vevent->setDateTime('DTSTAMP', 'now', Sabre_VObject_Element_DateTime::UTC);
+$vevent->setDateTime('LAST-MODIFIED', 'now', Sabre_VObject_Property_DateTime::UTC);
+$vevent->setDateTime('DTSTAMP', 'now', Sabre_VObject_Property_DateTime::UTC);
$result = OC_Calendar_Object::edit($id, $vcalendar->serialize());
$lastmodified = $vevent->__get('LAST-MODIFIED')->getDateTime();
diff --git a/apps/calendar/ajax/events.php b/apps/calendar/ajax/events.php
index 1436f634316..6ea556a7abf 100755
--- a/apps/calendar/ajax/events.php
+++ b/apps/calendar/ajax/events.php
@@ -47,7 +47,7 @@ foreach($events as $event){
$dtend = OC_Calendar_Object::getDTEndFromVEvent($vevent);
$start_dt = $dtstart->getDateTime();
$end_dt = $dtend->getDateTime();
- if ($dtstart->getDateType() == Sabre_VObject_Element_DateTime::DATE){
+ if ($dtstart->getDateType() == Sabre_VObject_Property_DateTime::DATE){
$return_event['allDay'] = true;
}else{
$return_event['allDay'] = false;
diff --git a/apps/calendar/lib/object.php b/apps/calendar/lib/object.php
index 230c610d35a..0b2cbb38157 100644
--- a/apps/calendar/lib/object.php
+++ b/apps/calendar/lib/object.php
@@ -625,7 +625,7 @@ class OC_Calendar_Object{
$vevent = new OC_VObject('VEVENT');
$vcalendar->add($vevent);
- $vevent->setDateTime('CREATED', 'now', Sabre_VObject_Element_DateTime::UTC);
+ $vevent->setDateTime('CREATED', 'now', Sabre_VObject_Property_DateTime::UTC);
$vevent->setUID();
return self::updateVCalendarFromRequest($request, $vcalendar);
@@ -786,24 +786,24 @@ class OC_Calendar_Object{
}
- $vevent->setDateTime('LAST-MODIFIED', 'now', Sabre_VObject_Element_DateTime::UTC);
- $vevent->setDateTime('DTSTAMP', 'now', Sabre_VObject_Element_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);
- $dtstart = new Sabre_VObject_Element_DateTime('DTSTART');
- $dtend = new Sabre_VObject_Element_DateTime('DTEND');
+ $dtstart = new Sabre_VObject_Property_DateTime('DTSTART');
+ $dtend = new Sabre_VObject_Property_DateTime('DTEND');
if($allday){
$start = new DateTime($from);
$end = new DateTime($to.' +1 day');
- $vevent->setDateTime('DTSTART', $start, Sabre_VObject_Element_DateTime::DATE);
- $vevent->setDateTime('DTEND', $end, Sabre_VObject_Element_DateTime::DATE);
+ $vevent->setDateTime('DTSTART', $start, Sabre_VObject_Property_DateTime::DATE);
+ $vevent->setDateTime('DTEND', $end, Sabre_VObject_Property_DateTime::DATE);
}else{
$timezone = OC_Preferences::getValue(OC_USER::getUser(), 'calendar', 'timezone', date_default_timezone_get());
$timezone = new DateTimeZone($timezone);
$start = new DateTime($from.' '.$fromtime, $timezone);
$end = new DateTime($to.' '.$totime, $timezone);
- $vevent->setDateTime('DTSTART', $start, Sabre_VObject_Element_DateTime::LOCALTZ);
- $vevent->setDateTime('DTEND', $end, Sabre_VObject_Element_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/apps/calendar/lib/search.php b/apps/calendar/lib/search.php
index 0016751a66a..79c8dba0f4d 100644
--- a/apps/calendar/lib/search.php
+++ b/apps/calendar/lib/search.php
@@ -26,7 +26,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_Element_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');