summaryrefslogtreecommitdiff
path: root/lib
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 11:25:51 -0800
commit918b662568c2d06a3fb41b4f82bc336f47f06166 (patch)
treed7977dd58becb0b39da1a47da84e94685b5c7fcf /lib
parent364038ce2acc1f02fbd0850c0371c97d1e9044a3 (diff)
Fix issue with favorited/following always being set to false
Diffstat (limited to 'lib')
-rw-r--r--lib/api.php22
-rw-r--r--lib/apiauth.php2
2 files changed, 12 insertions, 12 deletions
diff --git a/lib/api.php b/lib/api.php
index eacb80dbe..ae47434a5 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.
@@ -188,13 +189,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);
diff --git a/lib/apiauth.php b/lib/apiauth.php
index 0d1613d38..7102764cb 100644
--- a/lib/apiauth.php
+++ b/lib/apiauth.php
@@ -53,8 +53,6 @@ require_once INSTALLDIR . '/lib/api.php';
class ApiAuthAction extends ApiAction
{
- var $auth_user = null;
-
/**
* Take arguments for running, and output basic auth header if needed
*