list($this->lists,
$this->next_cursor,
- $this->prev_cursor) = Profile_list::getAtCursor($fn, array($this->auth_user), $cursor, $count);
+ $this->prev_cursor) = Profile_list::getAtCursor($fn, array($this->scoped), $cursor, $count);
}
function isReadOnly($args)
}
$profile = $this->user->getProfile();
- $tags = $profile->getLists(common_current_user());
+ $tags = $profile->getLists($this->scoped);
$this->tags = array();
while ($tags->fetch()) {
$user = common_current_user();
if ($this->arg('public')) {
- $this->tags = $this->tagger->getLists(false, $offset, $limit);
+ $this->tags = $this->tagger->getLists(null, $offset, $limit);
} else if ($this->arg('private')) {
if (empty($user)) {
// TRANS: Error message displayed when trying to perform an action that requires a logged in user.
$this->clientError(_('You cannot view others\' private lists'), 403);
}
} else {
- $this->tags = $this->tagger->getLists(common_current_user(), $offset, $limit);
+ $this->tags = $this->tagger->getLists($this->scoped, $offset, $limit);
}
return true;
}
return false;
}
- function getLists($auth_user, $offset=0, $limit=null, $since_id=0, $max_id=0)
+ function getLists(Profile $scoped=null, $offset=0, $limit=null, $since_id=0, $max_id=0)
{
$ids = array();
self::cacheSet($keypart, implode(',', $ids));
}
- $showPrivate = (($auth_user instanceof User ||
- $auth_user instanceof Profile) &&
- $auth_user->id === $this->id);
+ $showPrivate = $this->sameAs($scoped);
$lists = array();
parent::__construct($out);
$this->profile = $profile;
- $user = common_current_user();
-
- $this->lists = $profile->getLists($user);
+ $this->lists = $profile->getLists(Profile::current());
}
function tag()