aboutsummaryrefslogtreecommitdiffstats
path: root/include/api.php
diff options
context:
space:
mode:
authorChristian Vogeley <christian.vogeley@hotmail.de>2014-01-25 03:50:47 +0100
committerChristian Vogeley <christian.vogeley@hotmail.de>2014-01-25 03:50:47 +0100
commit6b3ea9dc141e668e4f88e20e864daf845b349995 (patch)
tree3d91c1678f2ef5b6811858d99c3b6cc8f9b689e4 /include/api.php
parentd341358afbf19622575fa36a632f9d40b39ae202 (diff)
downloadvolse-hubzilla-6b3ea9dc141e668e4f88e20e864daf845b349995.tar.gz
volse-hubzilla-6b3ea9dc141e668e4f88e20e864daf845b349995.tar.bz2
volse-hubzilla-6b3ea9dc141e668e4f88e20e864daf845b349995.zip
API My wall posts
Diffstat (limited to 'include/api.php')
-rw-r--r--include/api.php46
1 files changed, 28 insertions, 18 deletions
diff --git a/include/api.php b/include/api.php
index 463d29cf8..8cb2c3152 100644
--- a/include/api.php
+++ b/include/api.php
@@ -7,6 +7,7 @@ require_once("oauth.php");
require_once("html2plain.php");
require_once('include/security.php');
require_once('include/photos.php');
+require_once('include/items.php');
/*
*
@@ -1244,24 +1245,33 @@ require_once('include/photos.php');
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`,
- `contact`.`network`, `contact`.`thumb`, `contact`.`dfrn_id`, `contact`.`self`,
- `contact`.`id` AS `cid`, `contact`.`uid` AS `contact-uid`
- FROM `item`, `contact`
- WHERE `item`.`uid` = %d
- AND `item`.`contact-id` = %d
- AND `item`.`visible` = 1 and `item`.`moderated` = 0 AND `item`.`deleted` = 0
- AND `contact`.`id` = `item`.`contact-id`
- AND `contact`.`blocked` = 0 AND `contact`.`pending` = 0
- $sql_extra
- AND `item`.`id`>%d
- ORDER BY `item`.`received` DESC LIMIT %d ,%d ",
- intval(api_user()),
- intval($user_info['id']),
- intval($since_id),
- intval($start), intval($count)
- );
+// $r = q("SELECT `item`.*, `item`.`id` AS `item_id`,
+// `contact`.`name`, `contact`.`photo`, `contact`.`url`, `contact`.`rel`,
+// `contact`.`network`, `contact`.`thumb`, `contact`.`dfrn_id`, `contact`.`self`,
+// `contact`.`id` AS `cid`, `contact`.`uid` AS `contact-uid`
+// FROM `item`, `contact`
+// WHERE `item`.`uid` = %d
+// AND `item`.`contact-id` = %d
+// AND `item`.`visible` = 1 and `item`.`moderated` = 0 AND `item`.`deleted` = 0
+// AND `contact`.`id` = `item`.`contact-id`
+// AND `contact`.`blocked` = 0 AND `contact`.`pending` = 0
+// $sql_extra
+// AND `item`.`id`>%d
+// ORDER BY `item`.`received` DESC LIMIT %d ,%d ",
+// intval(api_user()),
+// intval($user_info['id']),
+// intval($since_id),
+// intval($start), intval($count)
+// );
+
+ $r = items_fetch(array(
+ 'uid' => api_user(),
+ 'cid' => $user_info['id'],
+ 'since_id' => $since_id,
+ 'start' => $start,
+ 'records' => $count,
+ 'wall' => 1));
+
$ret = api_format_items($r,$user_info);