X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2F_well_known.php;h=f6a351bb2369802f5b16bc015594b43387b0233a;hb=41663c7592abe55a958632c3a48265e0a8544d2b;hp=4b37c0b97f05fb162fd424a27c94d7144dcecba8;hpb=39ff6e9ce9251fe69b56ba05ea7bdc1896f34de2;p=friendica.git diff --git a/mod/_well_known.php b/mod/_well_known.php index 4b37c0b97f..f6a351bb23 100644 --- a/mod/_well_known.php +++ b/mod/_well_known.php @@ -2,10 +2,11 @@ use Friendica\App; use Friendica\Core\Config; +use Friendica\Core\System; -require_once("mod/hostxrd.php"); -require_once("mod/nodeinfo.php"); -require_once("mod/xrd.php"); +require_once 'mod/hostxrd.php'; +require_once 'mod/nodeinfo.php'; +require_once 'mod/xrd.php'; function _well_known_init(App $a) { @@ -25,8 +26,7 @@ function _well_known_init(App $a) break; } } - http_status_exit(404); - killme(); + System::httpExit(404); } function wk_social_relay() @@ -45,8 +45,10 @@ function wk_social_relay() $server_tags = Config::get('system', 'relay_server_tags'); $tagitems = explode(",", $server_tags); + /// @todo Check if it was better to use "strtolower" on the tags foreach ($tagitems AS $tag) { - $tags[trim($tag, "# ")] = trim($tag, "# "); + $tag = trim($tag, "# "); + $tags[$tag] = $tag; } if (Config::get('system', 'relay_user_tags')) { @@ -61,13 +63,17 @@ function wk_social_relay() $taglist = []; foreach ($tags AS $tag) { - $taglist[] = $tag; + if (!empty($tag)) { + $taglist[] = $tag; + } } $relay = [ - "subscribe" => $subscribe, - "scope" => $scope, - "tags" => $taglist + 'subscribe' => $subscribe, + 'scope' => $scope, + 'tags' => $taglist, + 'protocols' => ['diaspora' => ['receive' => System::baseUrl() . '/receive/public'], + 'dfrn' => ['receive' => System::baseUrl() . '/dfrn_notify']] ]; header('Content-type: application/json; charset=utf-8');