From dab3e9035363a1173439fb16c6e06eede62b573e Mon Sep 17 00:00:00 2001 From: zotlabs Date: Wed, 26 Apr 2017 13:26:50 -0700 Subject: provide a broken feed as a separate module --- Zotlabs/Module/Ofeed.php | 48 ++++++++++++++++++++++++++++++++++++++++++++++ Zotlabs/Module/Wfinger.php | 2 +- Zotlabs/Module/Xrd.php | 2 +- 3 files changed, 50 insertions(+), 2 deletions(-) create mode 100644 Zotlabs/Module/Ofeed.php (limited to 'Zotlabs/Module') diff --git a/Zotlabs/Module/Ofeed.php b/Zotlabs/Module/Ofeed.php new file mode 100644 index 000000000..2b7acff99 --- /dev/null +++ b/Zotlabs/Module/Ofeed.php @@ -0,0 +1,48 @@ + 1) { + + if(observer_prohibited(true)) { + killme(); + } + + $channel = channelx_by_nick(argv(1)); + if(! $channel) { + killme(); + } + + + logger('public feed request from ' . $_SERVER['REMOTE_ADDR'] . ' for ' . $channel['channel_address']); + + echo get_public_feed($channel,$params); + + killme(); + } + + } + +} diff --git a/Zotlabs/Module/Wfinger.php b/Zotlabs/Module/Wfinger.php index 118ec5e7c..9623a676b 100644 --- a/Zotlabs/Module/Wfinger.php +++ b/Zotlabs/Module/Wfinger.php @@ -107,7 +107,7 @@ class Wfinger extends \Zotlabs\Web\Controller { [ 'rel' => 'http://schemas.google.com/g/2010#updates-from', 'type' => 'application/atom+xml', - 'href' => z_root() . '/feed/' . $r[0]['channel_address'] . '/?compat=1' + 'href' => z_root() . '/ofeed/' . $r[0]['channel_address'] ], [ diff --git a/Zotlabs/Module/Xrd.php b/Zotlabs/Module/Xrd.php index 7fd81e490..7b36576e0 100644 --- a/Zotlabs/Module/Xrd.php +++ b/Zotlabs/Module/Xrd.php @@ -57,7 +57,7 @@ class Xrd extends \Zotlabs\Web\Controller { '$aliases' => $aliases, '$profile_url' => z_root() . '/channel/' . $r[0]['channel_address'], '$hcard_url' => z_root() . '/hcard/' . $r[0]['channel_address'], - '$atom' => z_root() . '/feed/' . $r[0]['channel_address'] . '/?compat=1', + '$atom' => z_root() . '/ofeed/' . $r[0]['channel_address'], '$zot_post' => z_root() . '/post/' . $r[0]['channel_address'], '$poco_url' => z_root() . '/poco/' . $r[0]['channel_address'], '$photo' => z_root() . '/photo/profile/l/' . $r[0]['channel_id'], -- cgit v1.2.3