exit(1);
}
-require_once INSTALLDIR . '/lib/apibareauth.php';
-
/**
* Returns the most recent notices (default 20) posted by the target user.
* This is the equivalent of 'You and friends' page accessed via Web.
function showTimeline()
{
$profile = $this->user->getProfile();
- $avatar = $profile->getAvatar(AVATAR_PROFILE_SIZE);
$sitename = common_config('site', 'name');
// TRANS: Timeline title for user and friends. %s is a user nickname.
$title = sprintf(_("%s and friends"), $this->user->nickname);
$this->user->nickname, $sitename
);
- $link = common_local_url(
- 'all',
- array('nickname' => $this->user->nickname)
- );
-
+ $logo = $profile->avatarUrl(AVATAR_PROFILE_SIZE);
+ $link = common_local_url('all',
+ array('nickname' => $this->user->nickname));
$self = $this->getSelfUri();
- $logo = (!empty($avatar))
- ? $avatar->displayUrl()
- : Avatar::defaultImage(AVATAR_PROFILE_SIZE);
-
switch($this->format) {
case 'xml':
$this->showXmlTimeline($this->notices);
{
$notices = array();
- $stream = new InboxNoticeStream($this->user);
+ $profile = null;
+
+ if (isset($this->auth_user)) {
+ $profile = $this->auth_user->getProfile();
+ }
+
+ $stream = new InboxNoticeStream($this->user, $profile);
$notice = $stream->getNotices(($this->page-1) * $this->count,
$this->count,