From: Zach Copley Date: Tue, 10 Nov 2009 08:30:56 +0000 (-0800) Subject: Output profile background image info in the API user objects X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=dbb86f948684cd5a5a49f6881f50082698fd39d1;p=quix0rs-gnu-social.git Output profile background image info in the API user objects --- diff --git a/lib/api.php b/lib/api.php index a1236ab7ec..45762ef0d3 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();