more optimisations for discovery mode of zotfeed
This commit is contained in:
parent
ac07b1b0ae
commit
d2b5bb843f
@ -3855,10 +3855,11 @@ function zot_feed($uid,$observer_xchan,$mindate) {
|
|||||||
|
|
||||||
if($r) {
|
if($r) {
|
||||||
$parents_str = ids_to_querystr($r,'parent');
|
$parents_str = ids_to_querystr($r,'parent');
|
||||||
|
$sys_query = ((is_sys_channel($uid)) ? $sql_extra : '');
|
||||||
|
|
||||||
$items = q("SELECT `item`.*, `item`.`id` AS `item_id` FROM `item`
|
$items = q("SELECT `item`.*, `item`.`id` AS `item_id` FROM `item`
|
||||||
WHERE `item`.`item_restrict` = 0
|
WHERE `item`.`item_restrict` = 0
|
||||||
AND `item`.`parent` IN ( %s ) ",
|
AND `item`.`parent` IN ( %s ) $sys_query ",
|
||||||
dbesc($parents_str)
|
dbesc($parents_str)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -3873,6 +3874,9 @@ function zot_feed($uid,$observer_xchan,$mindate) {
|
|||||||
else
|
else
|
||||||
$items = array();
|
$items = array();
|
||||||
|
|
||||||
|
|
||||||
|
logger('zot_feed: number items: ' . count($items),LOGGER_DEBUG);
|
||||||
|
|
||||||
foreach($items as $item)
|
foreach($items as $item)
|
||||||
$result[] = encode_item($item);
|
$result[] = encode_item($item);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user