aboutsummaryrefslogtreecommitdiffstats
path: root/include/items.php
diff options
context:
space:
mode:
authorChristian Vogeley <christian.vogeley@hotmail.de>2014-01-22 23:15:42 +0100
committerChristian Vogeley <christian.vogeley@hotmail.de>2014-01-22 23:15:42 +0100
commitd341358afbf19622575fa36a632f9d40b39ae202 (patch)
treecce4dc77ef02a7946b38a35a1955b97aef0b1ca7 /include/items.php
parent39142002238b416a2d823245cf046ca9eee0bf94 (diff)
downloadvolse-hubzilla-d341358afbf19622575fa36a632f9d40b39ae202.tar.gz
volse-hubzilla-d341358afbf19622575fa36a632f9d40b39ae202.tar.bz2
volse-hubzilla-d341358afbf19622575fa36a632f9d40b39ae202.zip
Add $since_id to items_fetch
Diffstat (limited to 'include/items.php')
-rwxr-xr-xinclude/items.php7
1 files changed, 5 insertions, 2 deletions
diff --git a/include/items.php b/include/items.php
index ea46df9bf..6e4f9f0d6 100755
--- a/include/items.php
+++ b/include/items.php
@@ -3718,7 +3718,7 @@ function items_fetch($arr,$channel = null,$observer_hash = null,$client_mode = C
$uidhash = $channel['channel_hash'];
$item_uids = " item.uid = " . intval($uid) . " ";
}
-
+
if($arr['star'])
$sql_options .= " and (item_flags & " . intval(ITEM_STARRED) . ") ";
@@ -3726,7 +3726,10 @@ function items_fetch($arr,$channel = null,$observer_hash = null,$client_mode = C
$sql_options .= " and (item_flags & " . intval(ITEM_WALL) . ") ";
$sql_extra = " AND item.parent IN ( SELECT parent FROM item WHERE (item_flags & " . intval(ITEM_THREAD_TOP) . ") $sql_options ) ";
-
+
+ if($arr['since_id'])
+ $sql_extra .= " and item.id > " . $since_id . " ";
+
if($arr['gid'] && $uid) {
$r = q("SELECT * FROM `groups` WHERE id = %d AND uid = %d LIMIT 1",
intval($arr['group']),