]> git.mxchange.org Git - friendica.git/blobdiff - mod/cal.php
Changes:
[friendica.git] / mod / cal.php
index 070cadf3d5c251ba0a53ff2e1b5d3e4051be3812..3f249da0aca21c457146fd4243eebc669ea06430 100644 (file)
@@ -35,6 +35,7 @@ use Friendica\Model\Event;
 use Friendica\Model\Item;
 use Friendica\Model\User;
 use Friendica\Module\BaseProfile;
+use Friendica\Module\Response;
 use Friendica\Network\HTTPException;
 use Friendica\Util\DateTimeFormat;
 use Friendica\Util\Temporal;
@@ -253,8 +254,7 @@ function cal_content(App $a)
                ]);
 
                if (!empty($_GET['id'])) {
-                       echo $o;
-                       exit();
+                       System::httpExit($o);
                }
 
                return $o;
@@ -289,10 +289,8 @@ function cal_content(App $a)
 
                // If nothing went wrong we can echo the export content
                if ($evexport["success"]) {
-                       header('Content-type: text/calendar');
                        header('content-disposition: attachment; filename="' . DI::l10n()->t('calendar') . '-' . $nick . '.' . $evexport["extension"] . '"');
-                       echo $evexport["content"];
-                       exit();
+                       System::httpExit($evexport["content"], Response::TYPE_BLANK, 'text/calendar');
                }
 
                return;