aboutsummaryrefslogtreecommitdiffstats
path: root/include/items.php
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2021-01-24 19:55:29 +0000
committerMario <mario@mariovavti.com>2021-01-24 19:55:29 +0000
commit2035828042e50f2c23f55d80b19fb898b170e6e5 (patch)
tree77d9b9e54248fd297ed98acac8f17a04faf76045 /include/items.php
parent4fbedb67508fd670493bf3be4f6a91160c4f1024 (diff)
downloadvolse-hubzilla-2035828042e50f2c23f55d80b19fb898b170e6e5.tar.gz
volse-hubzilla-2035828042e50f2c23f55d80b19fb898b170e6e5.tar.bz2
volse-hubzilla-2035828042e50f2c23f55d80b19fb898b170e6e5.zip
revert externals/zotfeed functionality due to scaling issues. Save zotfeed consumers that are not our contacts in thread listeners
Diffstat (limited to 'include/items.php')
-rwxr-xr-xinclude/items.php31
1 files changed, 5 insertions, 26 deletions
diff --git a/include/items.php b/include/items.php
index 7229b66eb..83108455f 100755
--- a/include/items.php
+++ b/include/items.php
@@ -4375,38 +4375,17 @@ function zot_feed($uid, $observer_hash, $arr) {
$item_normal = item_normal();
if (is_sys_channel($uid)) {
+
$nonsys_uids = q("SELECT channel_id FROM channel WHERE channel_system = 0");
$nonsys_uids_str = ids_to_querystr($nonsys_uids, 'channel_id');
- if ($arr['total']) {
- $items = q("SELECT count(created) AS total FROM item
- WHERE uid IN ( %s )
- AND item_private = 0
- $sql_extra $item_normal",
- dbesc($nonsys_uids_str)
- );
- if ($items) {
- return intval($items[0]['total']);
- }
- return 0;
- }
-
- $itemspage = (($uid) ? get_pconfig($uid, 'system', 'itemspage') : 30);
- App::set_pager_itemspage(((intval($itemspage)) ? $itemspage : 30));
- $pager_sql = sprintf(" LIMIT %d OFFSET %d ", intval(App::$pager['itemspage']), intval(App::$pager['start']));
-
- $items = q("SELECT item.*, item.id AS item_id FROM item
+ $r = q("SELECT parent, postopts FROM item
WHERE uid IN ( %s )
AND item_private = 0
- $item_normal $sql_extra
- ORDER BY item.created DESC $pager_sql",
+ $item_normal
+ $sql_extra ORDER BY created ASC $limit",
dbesc($nonsys_uids_str)
);
-
- xchan_query($items);
- $items = fetch_post_tags($items, true);
-
- return $items;
}
else {
$r = q("SELECT parent, postopts FROM item
@@ -4432,6 +4411,7 @@ function zot_feed($uid, $observer_hash, $arr) {
$parents_str = ids_to_querystr($parents, 'parent');
$sys_query = ((is_sys_channel($uid)) ? $sql_extra : '');
+ $item_normal = item_normal();
$items = q("SELECT item.*, item.id AS item_id FROM item
WHERE item.parent IN ( %s ) $item_normal $sys_query ",
@@ -4456,7 +4436,6 @@ function zot_feed($uid, $observer_hash, $arr) {
return $result;
}
-
function items_fetch($arr,$channel = null,$observer_hash = null,$client_mode = CLIENT_MODE_NORMAL,$module = 'network') {
$result = array('success' => false);