diff options
author | Zach Copley <zach@status.net> | 2009-11-10 00:30:56 -0800 |
---|---|---|
committer | Zach Copley <zach@status.net> | 2009-11-10 00:30:56 -0800 |
commit | dbb86f948684cd5a5a49f6881f50082698fd39d1 (patch) | |
tree | 17c8de98d4187c950fbb18f2893eb004a5c0b5e3 /lib | |
parent | c8bd6d9f7afde597f3b404acb05622a73f3738f7 (diff) |
Output profile background image info in the API user objects
Diffstat (limited to 'lib')
-rw-r--r-- | lib/api.php | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/lib/api.php b/lib/api.php index a1236ab7e..45762ef0d 100644 --- a/lib/api.php +++ b/lib/api.php @@ -177,9 +177,14 @@ class ApiAction extends Action $twitter_user['utc_offset'] = $t->format('Z'); $twitter_user['time_zone'] = $timezone; - // To be supported some day, perhaps - $twitter_user['profile_background_image_url'] = ''; - $twitter_user['profile_background_tile'] = false; + $twitter_user['profile_background_image_url'] + = empty($design->backgroundimage) + ? '' : ($design->disposition & BACKGROUND_ON) + ? Design::url($design->backgroundimage) : ''; + + $twitter_user['profile_background_tile'] + = empty($design->disposition) + ? '' : ($design->disposition & BACKGROUND_TILE) ? 'true' : 'false'; $twitter_user['statuses_count'] = $profile->noticeCount(); |