From 4f7f547190f5ec2557739aad6b2c09e3f45cdc76 Mon Sep 17 00:00:00 2001 From: friendica Date: Thu, 24 Jan 2013 14:31:57 -0800 Subject: why oh why is poco_load not getting called? oh - that's why. --- mod/zotfeed.php | 3 +++ 1 file changed, 3 insertions(+) (limited to 'mod/zotfeed.php') diff --git a/mod/zotfeed.php b/mod/zotfeed.php index 6519481d2..76a860139 100644 --- a/mod/zotfeed.php +++ b/mod/zotfeed.php @@ -16,6 +16,9 @@ function zotfeed_init(&$a) { json_return_and_die($result); } + $observer = $a->get_observer(); + + $channel_address = ((argc() > 1) ? argv(1) : ''); if($channel_address) { $r = q("select channel_id from channel where channel_address = '%s' limit 1", -- cgit v1.2.3 From 79dacc3f1ad86aabfc78c0ecb8603720dedd4cfe Mon Sep 17 00:00:00 2001 From: friendica Date: Mon, 29 Jul 2013 20:31:02 -0700 Subject: fix some weirdness on the zot feed --- mod/zotfeed.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mod/zotfeed.php') diff --git a/mod/zotfeed.php b/mod/zotfeed.php index 76a860139..2ca049563 100644 --- a/mod/zotfeed.php +++ b/mod/zotfeed.php @@ -9,7 +9,7 @@ function zotfeed_init(&$a) { $mindate = (($_REQUEST['mindate']) ? datetime_convert('UTC','UTC',$_REQUEST['mindate']) : ''); if(! $mindate) - $mindate = '0000-00-00 00:00:00'; + $mindate = datetime_convert('UTC','UTC', 'now - 1 month'); if(get_config('system','block_public') && (! get_account_id()) && (! remote_user())) { $result['message'] = 'Public access denied'; -- cgit v1.2.3 From 06e0272db873ad0b7dbc96596e92b8c635f940a2 Mon Sep 17 00:00:00 2001 From: friendica Date: Sun, 17 Nov 2013 16:50:32 -0800 Subject: populate some posts when somebody is granted "read stream" permission --- mod/zotfeed.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'mod/zotfeed.php') diff --git a/mod/zotfeed.php b/mod/zotfeed.php index 2ca049563..6d84a5a1e 100644 --- a/mod/zotfeed.php +++ b/mod/zotfeed.php @@ -21,7 +21,7 @@ function zotfeed_init(&$a) { $channel_address = ((argc() > 1) ? argv(1) : ''); if($channel_address) { - $r = q("select channel_id from channel where channel_address = '%s' limit 1", + $r = q("select channel_id, channel_name from channel where channel_address = '%s' limit 1", dbesc(argv(1)) ); } @@ -30,6 +30,8 @@ function zotfeed_init(&$a) { json_return_and_die($result); } + logger('zotfeed request: ' . $r[0]['channel_name'], LOGGER_DEBUG); + $result['messages'] = zot_feed($r[0]['channel_id'],$observer['xchan_hash'],$mindate); $result['success'] = true; json_return_and_die($result); -- cgit v1.2.3 From 79f5fd8e2a4959b78cf8be6312962849e14e9d85 Mon Sep 17 00:00:00 2001 From: friendica Date: Wed, 26 Mar 2014 16:09:07 -0700 Subject: allow zotfeed to create a firehose of a site. --- mod/zotfeed.php | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'mod/zotfeed.php') diff --git a/mod/zotfeed.php b/mod/zotfeed.php index 6d84a5a1e..1f5dc2cfa 100644 --- a/mod/zotfeed.php +++ b/mod/zotfeed.php @@ -25,6 +25,11 @@ function zotfeed_init(&$a) { dbesc(argv(1)) ); } + else { + $x = get_sys_channel(); + if($x) + $r = array($x); + } if(! $r) { $result['message'] = 'Channel not found.'; json_return_and_die($result); -- cgit v1.2.3 From 30e2e32f191b0fa9132792e520f02af8c4a6f475 Mon Sep 17 00:00:00 2001 From: friendica Date: Thu, 17 Apr 2014 20:03:28 -0700 Subject: improve zotfeed for discover channel so it will send updates to posts you've already received. Incidentally I discovered why we had the meltdown replying to discover channel items the other day - but can't fix it easily. --- mod/zotfeed.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'mod/zotfeed.php') diff --git a/mod/zotfeed.php b/mod/zotfeed.php index 1f5dc2cfa..480e886cd 100644 --- a/mod/zotfeed.php +++ b/mod/zotfeed.php @@ -21,8 +21,9 @@ function zotfeed_init(&$a) { $channel_address = ((argc() > 1) ? argv(1) : ''); if($channel_address) { - $r = q("select channel_id, channel_name from channel where channel_address = '%s' limit 1", - dbesc(argv(1)) + $r = q("select channel_id, channel_name from channel where channel_address = '%s' and not (channel_pageflags & %d) limit 1", + dbesc(argv(1)), + intval(PAGE_REMOVED) ); } else { -- cgit v1.2.3