aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs
diff options
context:
space:
mode:
authorgit-marijus <mario@mariovavti.com>2017-04-27 09:49:13 +0200
committerGitHub <noreply@github.com>2017-04-27 09:49:13 +0200
commitd16fbda0f8c97b504c20cbcfbd07031ef0fa62fe (patch)
tree681d5136af5693fdfcd34347d38713635f28f4ba /Zotlabs
parent1c304eb8ba5395e62c0245133d58a3f00adaeaac (diff)
parentdab3e9035363a1173439fb16c6e06eede62b573e (diff)
downloadvolse-hubzilla-d16fbda0f8c97b504c20cbcfbd07031ef0fa62fe.tar.gz
volse-hubzilla-d16fbda0f8c97b504c20cbcfbd07031ef0fa62fe.tar.bz2
volse-hubzilla-d16fbda0f8c97b504c20cbcfbd07031ef0fa62fe.zip
Merge pull request #736 from zotlabs/feedfck
provide a broken feed as a separate module
Diffstat (limited to 'Zotlabs')
-rw-r--r--Zotlabs/Module/Ofeed.php48
-rw-r--r--Zotlabs/Module/Wfinger.php2
-rw-r--r--Zotlabs/Module/Xrd.php2
3 files changed, 50 insertions, 2 deletions
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 @@
+<?php
+
+namespace Zotlabs\Module;
+
+/* Ofeed: Broken feed for software which requires broken feeds */
+
+require_once('include/items.php');
+
+class Ofeed extends \Zotlabs\Web\Controller {
+
+ function init() {
+
+ $params = [];
+
+ $params['begin'] = ((x($_REQUEST,'date_begin')) ? $_REQUEST['date_begin'] : NULL_DATE);
+ $params['end'] = ((x($_REQUEST,'date_end')) ? $_REQUEST['date_end'] : '');
+ $params['type'] = ((stristr(argv(0),'json')) ? 'json' : 'xml');
+ $params['pages'] = ((x($_REQUEST,'pages')) ? intval($_REQUEST['pages']) : 0);
+ $params['top'] = ((x($_REQUEST,'top')) ? intval($_REQUEST['top']) : 0);
+ $params['start'] = ((x($params,'start')) ? intval($params['start']) : 0);
+ $params['records'] = ((x($params,'records')) ? intval($params['records']) : 40);
+ $params['direction'] = ((x($params,'direction')) ? dbesc($params['direction']) : 'desc');
+ $params['cat'] = ((x($_REQUEST,'cat')) ? escape_tags($_REQUEST['cat']) : '');
+ $params['compat'] = ((x($_REQUEST,'compat')) ? intval($_REQUEST['compat']) : 1);
+
+
+ if(argc() > 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'],