<?php
-
-
+use Friendica\Core\L10n;
/**
* @param mixed $obj
$cs = wdcal_print_feed_getCal($server, DAV_ACL_WRITE);
if ($cs == null) {
echo wdcal_jsonp_encode(array('IsSuccess' => false,
- 'Msg' => t('No access')));
+ 'Msg' => L10n::t('No access')));
killme();
}
try {
$component = dav_get_eventComponent($item);
$component->add("SUMMARY", icalendar_sanitize_string(dav_compat_parse_text_serverside("CalendarTitle")));
- if (isset($_REQUEST["allday"])) $type = Sabre_VObject_Property_DateTime::DATE;
- else $type = Sabre_VObject_Property_DateTime::LOCALTZ;
+ if (isset($_REQUEST["allday"])) $type = Sabre\VObject\Property\DateTime::DATE;
+ else $type = Sabre\VObject\Property\DateTime::LOCALTZ;
- $datetime_start = new Sabre_VObject_Property_DateTime("DTSTART");
+ $datetime_start = new Sabre\VObject\Property\DateTime("DTSTART");
$datetime_start->setDateTime(new DateTime(date("Y-m-d H:i:s", IntVal($_REQUEST["CalendarStartTime"]))), $type);
- $datetime_end = new Sabre_VObject_Property_DateTime("DTEND");
+ $datetime_end = new Sabre\VObject\Property\DateTime("DTEND");
$datetime_end->setDateTime(new DateTime(date("Y-m-d H:i:s", IntVal($_REQUEST["CalendarEndTime"]))), $type);
$component->add($datetime_start);
$r = q("SELECT `calendarobject_id`, `calendar_id` FROM %s%sjqcalendar WHERE `id`=%d", CALDAV_SQL_DB, CALDAV_SQL_PREFIX, IntVal($_REQUEST["jq_id"]));
if (count($r) != 1) {
echo wdcal_jsonp_encode(array('IsSuccess' => false,
- 'Msg' => t('No access')));
+ 'Msg' => L10n::t('No access')));
killme();
}
try {
if (!$component) {
echo wdcal_jsonp_encode(array('IsSuccess' => false,
- 'Msg' => t('No access')));
+ 'Msg' => L10n::t('No access')));
killme();
}
- if (isset($_REQUEST["allday"])) $type = Sabre_VObject_Property_DateTime::DATE;
- else $type = Sabre_VObject_Property_DateTime::LOCALTZ;
+ if (isset($_REQUEST["allday"])) $type = Sabre\VObject\Property\DateTime::DATE;
+ else $type = Sabre\VObject\Property\DateTime::LOCALTZ;
- $datetime_start = new Sabre_VObject_Property_DateTime("DTSTART");
+ $datetime_start = new Sabre\VObject\Property\DateTime("DTSTART");
$datetime_start->setDateTime(new DateTime(date("Y-m-d H:i:s", IntVal($_REQUEST["CalendarStartTime"]))), $type);
- $datetime_end = new Sabre_VObject_Property_DateTime("DTEND");
+ $datetime_end = new Sabre\VObject\Property\DateTime("DTEND");
$datetime_end->setDateTime(new DateTime(date("Y-m-d H:i:s", IntVal($_REQUEST["CalendarEndTime"]))), $type);
$component->__unset("DTSTART");
);
} catch (Exception $e) {
echo wdcal_jsonp_encode(array('IsSuccess' => false,
- 'Msg' => t('No access')));
+ 'Msg' => L10n::t('No access')));
killme();
}
break;
$r = q("SELECT `calendarobject_id`, `calendar_id` FROM %s%sjqcalendar WHERE `id`=%d", CALDAV_SQL_DB, CALDAV_SQL_PREFIX, IntVal($_REQUEST["jq_id"]));
if (count($r) != 1) {
echo wdcal_jsonp_encode(array('IsSuccess' => false,
- 'Msg' => t('No access')));
+ 'Msg' => L10n::t('No access')));
killme();
}
try {
);
} catch (Exception $e) {
echo wdcal_jsonp_encode(array('IsSuccess' => false,
- 'Msg' => t('No access')));
+ 'Msg' => L10n::t('No access')));
killme();
}