summaryrefslogtreecommitdiff
path: root/actions
diff options
context:
space:
mode:
authorDan Moore <dan@moore.cx>2009-04-18 15:33:36 -0400
committerDan Moore <dan@moore.cx>2009-04-18 15:33:36 -0400
commit90fb7be99a74689de0d0e2409230d8bd515ac5c3 (patch)
tree0c2ba2ad7e518be56672d80b1dae28994bba2d31 /actions
parentbd41896f4ae4d5a052244cd2f6b40060da01bd43 (diff)
Bringing the presentation of boolean variables (favorited, truncated, profile_background_tile) and the result from friendships/exist in JSON results from the Twitter Compatible API in line with what the real Twitter API does.
Currently, laconica returns text strings enclosed in quotes instead of bare Javascript booleans. This change fixes that. See http://laconi.ca/trac/ticket/1326 for one open issue related to this.
Diffstat (limited to 'actions')
-rw-r--r--actions/twitapifriendships.php6
-rw-r--r--actions/twitapiusers.php2
2 files changed, 2 insertions, 6 deletions
diff --git a/actions/twitapifriendships.php b/actions/twitapifriendships.php
index c50c5e84a..2f8250e0d 100644
--- a/actions/twitapifriendships.php
+++ b/actions/twitapifriendships.php
@@ -133,11 +133,7 @@ class TwitapifriendshipsAction extends TwitterapiAction
return;
}
- if ($user_a->isSubscribed($user_b)) {
- $result = 'true';
- } else {
- $result = 'false';
- }
+ $result = $user_a->isSubscribed($user_b);
switch ($apidata['content-type']) {
case 'xml':
diff --git a/actions/twitapiusers.php b/actions/twitapiusers.php
index 2894b7486..41d0d955b 100644
--- a/actions/twitapiusers.php
+++ b/actions/twitapiusers.php
@@ -83,7 +83,7 @@ class TwitapiusersAction extends TwitterapiAction
$twitter_user['profile_link_color'] = '';
$twitter_user['profile_sidebar_fill_color'] = '';
$twitter_user['profile_sidebar_border_color'] = '';
- $twitter_user['profile_background_tile'] = 'false';
+ $twitter_user['profile_background_tile'] = false;
$faves = DB_DataObject::factory('fave');
$faves->user_id = $user->id;