X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FModule%2FFeed.php;h=e5ebe2a4d66239e4551232fb68c49b3fe639e05a;hb=3cd654e76f32dbcf505aef6a60a3e42d318f8b61;hp=2be12f13e48ce8204c79e187c09e630f8ea9d189;hpb=5c1fae25368c41aef9a8a18ccda27fc35b0b9318;p=friendica.git diff --git a/src/Module/Feed.php b/src/Module/Feed.php index 2be12f13e4..e5ebe2a4d6 100644 --- a/src/Module/Feed.php +++ b/src/Module/Feed.php @@ -20,7 +20,7 @@ use Friendica\Protocol\OStatus; * * @brief Provides public Atom feeds * - * @author Hypolite Petovan + * @author Hypolite Petovan */ class Feed extends BaseModule { @@ -28,8 +28,8 @@ class Feed extends BaseModule { $a = self::getApp(); - $last_update = x($_GET, 'last_update') ? $_GET['last_update'] : ''; - $nocache = x($_GET, 'nocache') && local_user(); + $last_update = defaults($_GET, 'last_update', ''); + $nocache = !empty($_GET['nocache']) && local_user(); if ($a->argc < 2) { System::httpExit(400); @@ -44,6 +44,7 @@ class Feed extends BaseModule case 'posts': case 'comments': case 'activity': + // Correct type names, no change needed break; case 'replies': $type = 'comments'; @@ -53,8 +54,8 @@ class Feed extends BaseModule } $nickname = $a->argv[1]; - header("Content-type: application/atom+xml"); - echo OStatus::feed($nickname, $last_update, 10, $type, $nocache); - killme(); + header("Content-type: application/atom+xml; charset=utf-8"); + echo OStatus::feed($nickname, $last_update, 10, $type, $nocache, true); + exit(); } }