zot feed - getting cut off too early
This commit is contained in:
parent
5613e27f00
commit
1a78c85fa0
@ -4732,24 +4732,27 @@ function zot_feed($uid,$observer_xchan,$mindate) {
|
|||||||
if(! $mindate)
|
if(! $mindate)
|
||||||
$mindate = '0000-00-00 00:00:00';
|
$mindate = '0000-00-00 00:00:00';
|
||||||
|
|
||||||
|
$mindate = dbesc($mindate);
|
||||||
|
|
||||||
if(! perm_is_allowed($uid,$observer_xchan,'view_stream')) {
|
if(! perm_is_allowed($uid,$observer_xchan,'view_stream')) {
|
||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
// FIXME
|
$sql_extra = item_permissions_sql($uid);
|
||||||
$sql_extra = item_permissions_sql($uid,$remote_contact,$groups);
|
|
||||||
|
|
||||||
if($mindate != '0000-00-00 00:00:00')
|
if($mindate != '0000-00-00 00:00:00') {
|
||||||
$sql_extra .= " and created > '$mindate' ";
|
$sql_extra .= " and created > '$mindate' ";
|
||||||
|
$limit = "";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
$limit = " limit 0, 50 ";
|
||||||
|
|
||||||
|
|
||||||
$limit = 50;
|
|
||||||
$items = array();
|
$items = array();
|
||||||
|
|
||||||
$r = q("SELECT item.*, item.id as item_id from item
|
$r = q("SELECT item.*, item.id as item_id from item
|
||||||
WHERE uid = %d AND item_restrict = 0 and id = parent
|
WHERE uid = %d AND item_restrict = 0 and id = parent
|
||||||
AND (item_flags & %d)
|
AND (item_flags & %d)
|
||||||
$sql_extra ORDER BY created ASC limit 0, $limit",
|
$sql_extra ORDER BY created ASC $limit",
|
||||||
intval($uid),
|
intval($uid),
|
||||||
intval(ITEM_WALL)
|
intval(ITEM_WALL)
|
||||||
);
|
);
|
||||||
|
Reference in New Issue
Block a user