diff options
author | Georg Ehrke <dev@georgswebsite.de> | 2012-02-11 14:02:51 +0100 |
---|---|---|
committer | Georg Ehrke <dev@georgswebsite.de> | 2012-02-11 14:02:51 +0100 |
commit | db23ec5c1c8a58d63bd81bee007994090b0bcecf (patch) | |
tree | 57e9b1285c914613194fb533f718f8d8720de24b /apps/calendar/lib/app.php | |
parent | 66ac6c232c22181a9cd7b83518f802df81aea3e9 (diff) | |
download | nextcloud-server-db23ec5c1c8a58d63bd81bee007994090b0bcecf.tar.gz nextcloud-server-db23ec5c1c8a58d63bd81bee007994090b0bcecf.zip |
show shared calendars
Diffstat (limited to 'apps/calendar/lib/app.php')
-rw-r--r-- | apps/calendar/lib/app.php | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/apps/calendar/lib/app.php b/apps/calendar/lib/app.php index 6e92cf67c5c..27129e77e35 100644 --- a/apps/calendar/lib/app.php +++ b/apps/calendar/lib/app.php @@ -114,4 +114,19 @@ class OC_Calendar_App{ public static function getWeekofMonth(){ return OC_Calendar_Object::getWeekofMonth(self::$l10n); } + + public static function prepareForOutput($event, $vevent, $return_event){ + $return_event['id'] = (int)$event['id']; + $return_event['title'] = htmlspecialchars($event['summary']); + $return_event['description'] = isset($vevent->DESCRIPTION)?htmlspecialchars($vevent->DESCRIPTION->value):''; + $last_modified = $vevent->__get('LAST-MODIFIED'); + if ($last_modified){ + $lastmodified = $last_modified->getDateTime()->format('U'); + }else{ + $lastmodified = 0; + } + $return_event['lastmodified'] = (int)$lastmodified; + return $return_event; + + } } |