]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/api.php
Merge branch '0.9.x' into finish-account-api
[quix0rs-gnu-social.git] / lib / api.php
index fb4c4289b4f0303d5bb84935553434c3ff02c7be..5da9d4982507a9e2fad590590a9e9a420b21762c 100644 (file)
@@ -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();