aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFriendika <info@friendika.com>2011-08-04 19:47:45 -0700
committerFriendika <info@friendika.com>2011-08-04 19:47:45 -0700
commit12d5482fc1703b66024ec432994c87ee9c1ea432 (patch)
tree526c396c04ebc707cf340fde203ba1aca41c57cc
parentf0af4de4a795ed3914f0e8e8ae3417a315d3dcd3 (diff)
downloadvolse-hubzilla-12d5482fc1703b66024ec432994c87ee9c1ea432.tar.gz
volse-hubzilla-12d5482fc1703b66024ec432994c87ee9c1ea432.tar.bz2
volse-hubzilla-12d5482fc1703b66024ec432994c87ee9c1ea432.zip
some fields in API timeline JSON must be int
-rw-r--r--include/api.php16
1 files changed, 8 insertions, 8 deletions
diff --git a/include/api.php b/include/api.php
index 8644c839c..9382f82c4 100644
--- a/include/api.php
+++ b/include/api.php
@@ -286,8 +286,8 @@
}
$ret = Array(
- 'uid' => $uinfo[0]['uid'],
- 'id' => $uinfo[0]['cid'],
+ 'uid' => intval($uinfo[0]['uid']),
+ 'id' => intval($uinfo[0]['cid']),
'name' => $uinfo[0]['name'],
'screen_name' => $uinfo[0]['nick'],
'location' => '', //$uinfo[0]['default-location'],
@@ -295,15 +295,15 @@
'url' => $uinfo[0]['url'],
'contact_url' => $a->get_baseurl()."/contacts/".$uinfo[0]['cid'],
'protected' => false, #
- 'friends_count' => $countfriends,
+ 'friends_count' => intval($countfriends),
'created_at' => api_date($uinfo[0]['name-date']),
'utc_offset' => 0, #XXX: fix me
'time_zone' => '', //$uinfo[0]['timezone'],
'geo_enabled' => false,
- 'statuses_count' => $countitms, #XXX: fix me
+ 'statuses_count' => intval($countitms), #XXX: fix me
'lang' => 'en', #XXX: fix me
'description' => '',
- 'followers_count' => $countfollowers, #XXX: fix me
+ 'followers_count' => intval($countfollowers), #XXX: fix me
'favourites_count' => 0,
'contributors_enabled' => false,
'follow_request_sent' => false,
@@ -723,16 +723,16 @@
'created_at'=> api_date($item['created']),
'published' => datetime_convert('UTC','UTC',$item['created'],ATOM_TIME),
'updated' => datetime_convert('UTC','UTC',$item['edited'],ATOM_TIME),
- 'id' => $item['id'],
+ 'id' => intval($item['id']),
'message_id' => $item['uri'],
'text' => strip_tags(bbcode($item['body'])),
'html' => bbcode($item['body']),
'source' => (($item['app']) ? $item['app'] : 'web'),
'url' => ($item['plink']!=''?$item['plink']:$item['author-link']),
'truncated' => False,
- 'in_reply_to_status_id' => ($item['parent']!=$item['id']?$item['parent']:''),
+ 'in_reply_to_status_id' => ($item['parent']!=$item['id']? intval($item['parent']):''),
'in_reply_to_user_id' => '',
- 'favorited' => false,
+ 'favorited' => $item['starred'] ? true : false,
'in_reply_to_screen_name' => '',
'geo' => '',
'coordinates' => $item['coord'],