aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2014-04-17 22:06:35 -0700
committerfriendica <info@friendica.com>2014-04-17 22:06:35 -0700
commitd2b5bb843fd3f0d464d8247d2be8c7d5ac9f534d (patch)
tree76156794eab52d5df8d464fcfaf7880e4a1aa0e6
parentac07b1b0aeddac0999aafe382f7ed22af7467e85 (diff)
downloadvolse-hubzilla-d2b5bb843fd3f0d464d8247d2be8c7d5ac9f534d.tar.gz
volse-hubzilla-d2b5bb843fd3f0d464d8247d2be8c7d5ac9f534d.tar.bz2
volse-hubzilla-d2b5bb843fd3f0d464d8247d2be8c7d5ac9f534d.zip
more optimisations for discovery mode of zotfeed
-rwxr-xr-xinclude/items.php8
1 files changed, 6 insertions, 2 deletions
diff --git a/include/items.php b/include/items.php
index a0a698836..8df090e0b 100755
--- a/include/items.php
+++ b/include/items.php
@@ -3855,10 +3855,11 @@ function zot_feed($uid,$observer_xchan,$mindate) {
if($r) {
$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`
WHERE `item`.`item_restrict` = 0
- AND `item`.`parent` IN ( %s ) ",
+ AND `item`.`parent` IN ( %s ) $sys_query ",
dbesc($parents_str)
);
}
@@ -3873,6 +3874,9 @@ function zot_feed($uid,$observer_xchan,$mindate) {
else
$items = array();
+
+ logger('zot_feed: number items: ' . count($items),LOGGER_DEBUG);
+
foreach($items as $item)
$result[] = encode_item($item);