]> source.dussan.org Git - nextcloud-server.git/commitdiff
Calendar Export: replace spaces with dashes in the name of the calendar / event
authorGeorg Ehrke <dev@georgswebsite.de>
Thu, 28 Jun 2012 17:04:14 +0000 (19:04 +0200)
committerGeorg Ehrke <dev@georgswebsite.de>
Thu, 28 Jun 2012 17:04:14 +0000 (19:04 +0200)
apps/calendar/export.php

index 5ed7092cbfe710e55cd40aaa884a17e26e8f2cae..1374c49cc0d0d443ffd2c2fbdaa78b3ca65f6fc7 100644 (file)
@@ -16,7 +16,7 @@ if(isset($cal)){
                exit;
        }
        header('Content-Type: text/Calendar');
-       header('Content-Disposition: inline; filename=' . $calendar['displayname'] . '.ics'); 
+       header('Content-Disposition: inline; filename=' . str_replace(' ', '-', $calendar['displayname']) . '.ics'); 
        echo OC_Calendar_Export::export($cal, OC_Calendar_Export::CALENDAR);
 }elseif(isset($event)){
        $data = OC_Calendar_App::getEventObject($_GET['eventid'], true);
@@ -25,6 +25,6 @@ if(isset($cal)){
                exit;
        }
        header('Content-Type: text/Calendar');
-       header('Content-Disposition: inline; filename=' . $data['summary'] . '.ics');
+       header('Content-Disposition: inline; filename=' . str_replace(' ', '-', $data['summary']) . '.ics');
        echo OC_Calendar_Export::export($event, OC_Calendar_Export::EVENT);
 }
\ No newline at end of file