]> source.dussan.org Git - nextcloud-server.git/commitdiff
some improvements for calendar export
authorGeorg Ehrke <dev@georgswebsite.de>
Sat, 30 Jun 2012 13:23:21 +0000 (15:23 +0200)
committerGeorg Ehrke <dev@georgswebsite.de>
Sat, 30 Jun 2012 13:23:21 +0000 (15:23 +0200)
apps/calendar/lib/export.php

index cd248ce92a65978b398077ef7dc02e5755e2b238..b05e758672baaa09c33896814d9ea05ba46b37d0 100644 (file)
@@ -37,7 +37,8 @@ class OC_Calendar_Export{
         */
        private static function calendar($id){
                $events = OC_Calendar_Object::all($id);
-               $return = "BEGIN:VCALENDAR\nVERSION:2.0\nPRODID:ownCloud Calendar " . OCP\App::getAppVersion('calendar') . "\n";
+               $calendar = OC_Calendar_Calendar::find($id);
+               $return = "BEGIN:VCALENDAR\nVERSION:2.0\nPRODID:ownCloud Calendar " . OCP\App::getAppVersion('calendar') . "\nX-WR-CALNAME:" . $calendar['displayname'] . "\n";
                foreach($events as $event){
                        $return .= self::generateEvent($event);
                }
@@ -52,7 +53,7 @@ class OC_Calendar_Export{
         */
        private static function event($id){
                $event = OC_Calendar_Object::find($id);
-               $return = "BEGIN:VCALENDAR\nVERSION:2.0\nPRODID:ownCloud Calendar " . OCP\App::getAppVersion('calendar') . "\n";
+               $return = "BEGIN:VCALENDAR\nVERSION:2.0\nPRODID:ownCloud Calendar " . OCP\App::getAppVersion('calendar') . "\nX-WR-CALNAME:" . $event['summary'] . "\n";
                $return .= self::generateEvent($event);
                $return .= "END:VCALENDAR";
                return $return;