]> 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 5e66639c4f64075dfd78d632dae6614e413762e6..e2ea87b43eb3d934d7c1d2d9bfa653fabcbe5037 100644 (file)
@@ -176,9 +176,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();