Skip to content

Commit

Permalink
Merge pull request #208 from RRZE-Webteam/dev
Browse files Browse the repository at this point in the history
Update Export.php
  • Loading branch information
rvdforst authored Jun 10, 2024
2 parents 619ba95 + 7772e9d commit bf3e345
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions includes/ICS/Export.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public function request()
$filename = $_GET['filename'] ?? '';
$urlHost = sanitize_title(parse_url(site_url(), PHP_URL_HOST));
if (strpos($filename, $urlHost) === false) {
$filename = $urlHost . '.ics';
$filename = $urlHost;
}

if (
Expand Down Expand Up @@ -172,10 +172,8 @@ private function build(array $data)
*/
private function stream(string $filename)
{
$filename = $filename . '.ics';

header('Content-Type: text/calendar; charset=' . get_option('blog_charset'), true);
header('Content-Disposition: attachment; filename=' . $filename);
header('Content-Disposition: attachment; filename=' . $filename . '.ics');
echo $this->vcalendar;
exit;
}
Expand Down

0 comments on commit bf3e345

Please sign in to comment.