Skip to content

Commit

Permalink
v2.0.23
Browse files Browse the repository at this point in the history
  • Loading branch information
kjmartens committed Aug 14, 2019
1 parent 01e28ca commit ec1538f
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 5 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Solspace Calendar Changelog

## 2.0.23 - 2019-08-13
### Fixed
- Fixed a bug where ICS export was not working correctly when `devMode` was disabled.

## 2.0.22 - 2019-07-31
### Fixed
- Fixed a bug where newly created events were not respecting the default site status setting in each calendar.
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "solspace/craft3-calendar",
"description": "The most powerful event management plugin for Craft.",
"version": "2.0.22",
"version": "2.0.23",
"type": "craft-plugin",
"authors": [
{
Expand Down
16 changes: 12 additions & 4 deletions src/Library/Export/AbstractExportCalendar.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,21 @@ final public function __construct(EventQuery $events, array $options = [])
*/
final public function export()
{
header('Content-type: text/calendar; charset=utf-8');
header('Content-Disposition: attachment; filename=' . time() . '.ics');

$exportString = $this->prepareStringForExport();

header('Content-Type: text/calendar; charset=utf-8');
header('Content-Disposition: attachment; filename="' . time() . '.ics"');

header('Content-Description: File Transfer');
header('Content-Type: text/calendar; charset=utf-8');
header('Content-Disposition: attachment; filename="' . time() . '.ics"');
header('Content-Transfer-Encoding: binary');
header('Expires: 0');
header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
header('Pragma: public');
header('Content-Length: ' . strlen($exportString));

echo $exportString;
exit();
}

/**
Expand Down

0 comments on commit ec1538f

Please sign in to comment.