From 5c179522bb00d019ec4691ffbb9b65371fc0f309 Mon Sep 17 00:00:00 2001 From: Mario Date: Sat, 25 Sep 2021 09:03:16 +0000 Subject: bring back externals (slightly different approach), rename zotfeed to outbox for consistency wit AP naming. warning: this commit requires update of addons! --- Zotlabs/Module/Zotfeed.php | 116 +++------------------------------------------ 1 file changed, 7 insertions(+), 109 deletions(-) (limited to 'Zotlabs/Module/Zotfeed.php') diff --git a/Zotlabs/Module/Zotfeed.php b/Zotlabs/Module/Zotfeed.php index e47367036..0b4c3c007 100644 --- a/Zotlabs/Module/Zotfeed.php +++ b/Zotlabs/Module/Zotfeed.php @@ -1,124 +1,22 @@ true, - 'wall' => 1, - 'datequery' => $params['end'], - 'datequery2' => $params['begin'], - 'direction' => dbesc($params['direction']), - 'pages' => $params['pages'], - 'order' => dbesc('post'), - 'top' => $params['top'], - 'cat' => $params['cat'], - 'compat' => $params['compat'] - ], $channel, $observer_hash, CLIENT_MODE_NORMAL, App::$module - ); - - if ($total) { - App::set_pager_total($total); - App::set_pager_itemspage(30); - } + } - if (App::$pager['unset'] && $total > 30) { - $ret = Activity::paged_collection_init($total, App::$query_string); - } - else { + function get() { - $items = items_fetch( - [ - 'wall' => 1, - 'datequery' => $params['end'], - 'datequery2' => $params['begin'], - 'records' => intval(App::$pager['itemspage']), - 'start' => intval(App::$pager['start']), - 'direction' => dbesc($params['direction']), - 'pages' => $params['pages'], - 'order' => dbesc('post'), - 'top' => $params['top'], - 'cat' => $params['cat'], - 'compat' => $params['compat'] - ], $channel, $observer_hash, CLIENT_MODE_NORMAL, App::$module - ); + $outbox = new Outbox(); + return $outbox->init(); - if ($items && $observer_hash) { + } - // check to see if this observer is a connection. If not, register any items - // belonging to this channel for notification of deletion/expiration +} - $x = q("select abook_id from abook where abook_channel = %d and abook_xchan = '%s'", - intval($channel['channel_id']), - dbesc($observer_hash) - ); - if (!$x) { - foreach ($items as $item) { - if (strpos($item['mid'], z_root()) === 0) { - ThreadListener::store($item['mid'], $observer_hash); - } - } - } - } - $ret = Activity::encode_item_collection($items, App::$query_string, 'OrderedCollection', $total); - } - as_return_and_die($ret, $channel); - } - } -} -- cgit v1.2.3