summaryrefslogtreecommitdiff
path: root/lib/api.php
diff options
context:
space:
mode:
authorZach Copley <zach@status.net>2009-12-14 18:16:45 +0000
committerZach Copley <zach@status.net>2009-12-14 18:16:45 +0000
commita199bd808a9dce64dd1d9a137b853b6ba0f6811b (patch)
treee4892e6a8a6d73f42dfef3e058c7f8f4b30aa5fc /lib/api.php
parent0679ed4285caaa671ee042fca43a47585ea6a784 (diff)
Fix issue with favorited/following always being set to false
Diffstat (limited to 'lib/api.php')
-rw-r--r--lib/api.php22
1 files changed, 12 insertions, 10 deletions
diff --git a/lib/api.php b/lib/api.php
index b7ab407a1..0c6650111 100644
--- a/lib/api.php
+++ b/lib/api.php
@@ -53,13 +53,14 @@ if (!defined('STATUSNET')) {
class ApiAction extends Action
{
- var $format = null;
- var $user = null;
- var $page = null;
- var $count = null;
- var $max_id = null;
- var $since_id = null;
- var $since = null;
+ var $format = null;
+ var $user = null;
+ var $auth_user = null;
+ var $page = null;
+ var $count = null;
+ var $max_id = null;
+ var $since_id = null;
+ var $since = null;
/**
* Initialization.
@@ -190,13 +191,14 @@ class ApiAction extends Action
$twitter_user['following'] = false;
$twitter_user['notifications'] = false;
- if (isset($apidata['user'])) {
+ if (isset($this->auth_user)) {
- $twitter_user['following'] = $apidata['user']->isSubscribed($profile);
+ $twitter_user['following'] = $this->auth_user->isSubscribed($profile);
// Notifications on?
$sub = Subscription::pkeyGet(array('subscriber' =>
- $apidata['user']->id, 'subscribed' => $profile->id));
+ $this->auth_user->id,
+ 'subscribed' => $profile->id));
if ($sub) {
$twitter_user['notifications'] = ($sub->jabber || $sub->sms);