aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2012-11-14 23:09:25 -0800
committerfriendica <info@friendica.com>2012-11-14 23:09:25 -0800
commitef192a3c14111bb144f338f43ed7ed9479d74f22 (patch)
tree3801b46d8b16867b9ab50e221f6adfc9616e7369 /include
parent5fee78b2150b740581d0060432ec5da5241f2df1 (diff)
downloadvolse-hubzilla-ef192a3c14111bb144f338f43ed7ed9479d74f22.tar.gz
volse-hubzilla-ef192a3c14111bb144f338f43ed7ed9479d74f22.tar.bz2
volse-hubzilla-ef192a3c14111bb144f338f43ed7ed9479d74f22.zip
start on item feed structures
Diffstat (limited to 'include')
-rwxr-xr-xinclude/items.php32
1 files changed, 27 insertions, 5 deletions
diff --git a/include/items.php b/include/items.php
index 77c2c2aa2..94554252c 100755
--- a/include/items.php
+++ b/include/items.php
@@ -470,11 +470,33 @@ function get_item_elements($j) {
function encode_item($item) {
-
-
-
-
- return json_encode($item);
+ $x = array();
+
+ $x['message_id'] = $item['uri'];
+ $x['message_top'] = $item['parent_uri'];
+ $x['message_parent'] = $item['thr_parent'];
+ $x['created'] = $item['created'];
+ $x['edited'] = $item['edited'];
+ $x['title'] = $item['title'];
+ $x['body'] = $item['body'];
+ $x['app'] = $item['app'];
+ $x['verb'] = $item['verb'];
+ $x['object_type'] = $item['obj_type'];
+ $x['target_type'] = $item['tgt_type'];
+ $x['permalink'] = $item['plink'];
+ $x['location'] = $item['location'];
+ $x['longlat'] = $item['coord'];
+
+ $x['owner'] = array();
+ $x['author'] = array();
+ $x['object'] = array();
+ $x['target'] = array();
+ $x['attach'] = array();
+ $x['restrictions'] = array();
+ $x['flags'] = array();
+ $x['tags'] = array();
+
+ return $x;
}