aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2013-07-29 20:39:12 -0700
committerfriendica <info@friendica.com>2013-07-29 20:39:12 -0700
commit1a78c85fa0da26abfed3d296e6c64623252fdba5 (patch)
treeacb62febdac126b221fd0f13ef826aa708e3868e
parent5613e27f001a22c8cad35bfce4fa04a4c914db42 (diff)
downloadvolse-hubzilla-1a78c85fa0da26abfed3d296e6c64623252fdba5.tar.gz
volse-hubzilla-1a78c85fa0da26abfed3d296e6c64623252fdba5.tar.bz2
volse-hubzilla-1a78c85fa0da26abfed3d296e6c64623252fdba5.zip
zot feed - getting cut off too early
-rwxr-xr-xinclude/items.php15
1 files changed, 9 insertions, 6 deletions
diff --git a/include/items.php b/include/items.php
index 1514ca7b6..38ee5df58 100755
--- a/include/items.php
+++ b/include/items.php
@@ -4732,24 +4732,27 @@ function zot_feed($uid,$observer_xchan,$mindate) {
if(! $mindate)
$mindate = '0000-00-00 00:00:00';
+ $mindate = dbesc($mindate);
+
if(! perm_is_allowed($uid,$observer_xchan,'view_stream')) {
return $result;
}
-// FIXME
- $sql_extra = item_permissions_sql($uid,$remote_contact,$groups);
+ $sql_extra = item_permissions_sql($uid);
- if($mindate != '0000-00-00 00:00:00')
+ if($mindate != '0000-00-00 00:00:00') {
$sql_extra .= " and created > '$mindate' ";
+ $limit = "";
+ }
+ else
+ $limit = " limit 0, 50 ";
-
- $limit = 50;
$items = array();
$r = q("SELECT item.*, item.id as item_id from item
WHERE uid = %d AND item_restrict = 0 and id = parent
AND (item_flags & %d)
- $sql_extra ORDER BY created ASC limit 0, $limit",
+ $sql_extra ORDER BY created ASC $limit",
intval($uid),
intval(ITEM_WALL)
);