aboutsummaryrefslogtreecommitdiffstats
path: root/include/api.php
diff options
context:
space:
mode:
authorSebastian Egbers <sebastian@egbers.info>2012-06-19 16:27:23 +0200
committerSebastian Egbers <sebastian@egbers.info>2012-06-19 16:27:23 +0200
commiteab3938471cd6d27b37be1b6f13dc4418c8ad020 (patch)
tree2fef3a9f46ceb2f19316d45e2842b819e58ef3d6 /include/api.php
parent43532b74142cfabd0afbf250d052bff99b0d7ef2 (diff)
downloadvolse-hubzilla-eab3938471cd6d27b37be1b6f13dc4418c8ad020.tar.gz
volse-hubzilla-eab3938471cd6d27b37be1b6f13dc4418c8ad020.tar.bz2
volse-hubzilla-eab3938471cd6d27b37be1b6f13dc4418c8ad020.zip
added exclude_replies option to api call statuses/user_timeline.
Diffstat (limited to 'include/api.php')
-rw-r--r--include/api.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/include/api.php b/include/api.php
index a58dd20df..691543907 100644
--- a/include/api.php
+++ b/include/api.php
@@ -1065,11 +1065,14 @@
$page = (x($_REQUEST,'page')?$_REQUEST['page']-1:0);
if ($page<0) $page=0;
$since_id = (x($_REQUEST,'since_id')?$_REQUEST['since_id']:0);
+ $exclude_replies = (x($_REQUEST,'exclude_replies')?1:0);
//$since_id = 0;//$since_id = (x($_REQUEST,'since_id')?$_REQUEST['since_id']:0);
$start = $page*$count;
- if ($user_info['self']==1) $sql_extra = "AND `item`.`wall` = 1 ";
+ $sql_extra = '';
+ if ($user_info['self']==1) $sql_extra .= " AND `item`.`wall` = 1 ";
+ if ($exclude_replies > 0) $sql_extra .= ' AND `item`.`parent` = `item`.`id`';
$r = q("SELECT `item`.*, `item`.`id` AS `item_id`,
`contact`.`name`, `contact`.`photo`, `contact`.`url`, `contact`.`rel`,