diff --git a/mod/cal.php b/mod/cal.php
index dea1c2b9e..3f249da0a 100644
--- a/mod/cal.php
+++ b/mod/cal.php
@@ -254,8 +254,7 @@ function cal_content(App $a)
]);
if (!empty($_GET['id'])) {
- echo $o;
- exit();
+ System::httpExit($o);
}
return $o;
diff --git a/mod/events.php b/mod/events.php
index 4db595ccc..082cdf55d 100644
--- a/mod/events.php
+++ b/mod/events.php
@@ -27,6 +27,7 @@ use Friendica\Core\ACL;
use Friendica\Core\Logger;
use Friendica\Core\Protocol;
use Friendica\Core\Renderer;
+use Friendica\Core\System;
use Friendica\Core\Theme;
use Friendica\Core\Worker;
use Friendica\Database\DBA;
@@ -122,8 +123,7 @@ function events_post(App $a)
if (strcmp($finish, $start) < 0 && !$nofinish) {
notice(DI::l10n()->t('Event can not end before it has started.'));
if (intval($_REQUEST['preview'])) {
- echo DI::l10n()->t('Event can not end before it has started.');
- exit();
+ System::httpExit(DI::l10n()->t('Event can not end before it has started.'));
}
DI::baseUrl()->redirect($onerror_path);
}
@@ -131,8 +131,7 @@ function events_post(App $a)
if (!$summary || ($start === DBA::NULL_DATETIME)) {
notice(DI::l10n()->t('Event title and start time are required.'));
if (intval($_REQUEST['preview'])) {
- echo DI::l10n()->t('Event title and start time are required.');
- exit();
+ System::httpExit(DI::l10n()->t('Event title and start time are required.'));
}
DI::baseUrl()->redirect($onerror_path);
}
@@ -192,9 +191,7 @@ function events_post(App $a)
$datarray['id'] = $event_id;
if (intval($_REQUEST['preview'])) {
- $html = Event::getHTML($datarray);
- echo $html;
- exit();
+ System::httpExit(Event::getHTML($datarray));
}
$event_id = Event::store($datarray);
@@ -391,8 +388,7 @@ function events_content(App $a)
]);
if (!empty($_GET['id'])) {
- echo $o;
- exit();
+ System::httpExit($o);
}
return $o;
diff --git a/mod/fbrowser.php b/mod/fbrowser.php
index d918021cf..1646b19df 100644
--- a/mod/fbrowser.php
+++ b/mod/fbrowser.php
@@ -24,6 +24,7 @@
use Friendica\App;
use Friendica\Core\Renderer;
+use Friendica\Core\System;
use Friendica\Database\DBA;
use Friendica\DI;
use Friendica\Model\Photo;
@@ -153,7 +154,6 @@ function fbrowser_content(App $a)
if (!empty($_GET['mode'])) {
return $o;
} else {
- echo $o;
- exit();
+ System::httpExit($o);
}
}
diff --git a/mod/oexchange.php b/mod/oexchange.php
index 31306a608..e279bfff2 100644
--- a/mod/oexchange.php
+++ b/mod/oexchange.php
@@ -21,7 +21,9 @@
use Friendica\App;
use Friendica\Core\Renderer;
+use Friendica\Core\System;
use Friendica\DI;
+use Friendica\Module\Response;
use Friendica\Module\Security\Login;
function oexchange_init(App $a) {
@@ -30,8 +32,7 @@ function oexchange_init(App $a) {
$tpl = Renderer::getMarkupTemplate('oexchange_xrd.tpl');
$o = Renderer::replaceMacros($tpl, ['$base' => DI::baseUrl()]);
- echo $o;
- exit();
+ System::httpExit($o, Response::TYPE_XML);
}
}
diff --git a/src/Module/ParseUrl.php b/src/Module/ParseUrl.php
index afb54ea32..91d09240b 100644
--- a/src/Module/ParseUrl.php
+++ b/src/Module/ParseUrl.php
@@ -88,8 +88,7 @@ class ParseUrl extends BaseModule
if ($format == 'json') {
System::jsonExit($arr['text']);
} else {
- echo $arr['text'];
- exit();
+ System::httpExit($arr['text']);
}
}
@@ -122,8 +121,7 @@ class ParseUrl extends BaseModule
System::jsonExit($ret);
} else {
- echo BBCode::embedURL($url, empty($_GET['noAttachment']), $title, $description, $_GET['tags'] ?? '');
- exit();
+ System::httpExit(BBCode::embedURL($url, empty($_GET['noAttachment']), $title, $description, $_GET['tags'] ?? ''));
}
}
}
diff --git a/view/templates/oexchange_xrd.tpl b/view/templates/oexchange_xrd.tpl
index aa952c0f4..7c31f2126 100644
--- a/view/templates/oexchange_xrd.tpl
+++ b/view/templates/oexchange_xrd.tpl
@@ -1,4 +1,3 @@
-
@@ -31,4 +30,3 @@
type="text/html"
/>
-
diff --git a/view/templates/poco_xml.tpl b/view/templates/poco_xml.tpl
index 82c67c8de..0e38a692c 100644
--- a/view/templates/poco_xml.tpl
+++ b/view/templates/poco_xml.tpl
@@ -1,4 +1,3 @@
-
{{if $response.sorted}}{{$response.sorted}}{{/if}}