summaryrefslogtreecommitdiff
path: root/actions
diff options
context:
space:
mode:
authorAdrian Lang <mail@adrianlang.de>2009-04-20 13:09:05 +0200
committerAdrian Lang <mail@adrianlang.de>2009-04-20 13:09:05 +0200
commit0dd90461cdc7aad26b6f855ca7f63988a4a74d74 (patch)
treea7b295ac9307484f6f4dec3f3b1697d177127b90 /actions
parent558fa2743e182e50efb8aa1ad3fbc756ca1665e7 (diff)
parent48846c38057b20bb51814c22456d6907cc2a99e8 (diff)
Merge branch '0.7.x' of git://gitorious.org/laconica/mgrdcm-twitapibools into review/master
Diffstat (limited to 'actions')
-rw-r--r--actions/twitapifriendships.php6
-rw-r--r--actions/twitapiusers.php28
2 files changed, 11 insertions, 23 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..1542cfb33 100644
--- a/actions/twitapiusers.php
+++ b/actions/twitapiusers.php
@@ -82,8 +82,8 @@ class TwitapiusersAction extends TwitterapiAction
$twitter_user['profile_text_color'] = '';
$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_sidebar_border_color'] = '';
+ $twitter_user['profile_background_tile'] = false;
$faves = DB_DataObject::factory('fave');
$faves->user_id = $user->id;
@@ -103,24 +103,16 @@ class TwitapiusersAction extends TwitterapiAction
if (isset($apidata['user'])) {
- if ($apidata['user']->isSubscribed($profile)) {
- $twitter_user['following'] = 'true';
- } else {
- $twitter_user['following'] = 'false';
- }
+ $twitter_user['following'] = $apidata['user']->isSubscribed($profile);
- // Notifications on?
- $sub = Subscription::pkeyGet(array('subscriber' =>
- $apidata['user']->id, 'subscribed' => $profile->id));
+ // Notifications on?
+ $sub = Subscription::pkeyGet(array('subscriber' =>
+ $apidata['user']->id, 'subscribed' => $profile->id));
- if ($sub) {
- if ($sub->jabber || $sub->sms) {
- $twitter_user['notifications'] = 'true';
- } else {
- $twitter_user['notifications'] = 'false';
- }
- }
- }
+ if ($sub) {
+ $twitter_user['notifications'] = ($sub->jabber || $sub->sms);
+ }
+ }
if ($apidata['content-type'] == 'xml') {
$this->init_document('xml');